Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -317,10 +317,18 @@ count /= 2; objects = OFAllocMemory(count, sizeof(id)); keys = OFAllocMemory(count, sizeof(id)); + + keys[i] = firstKey; + objects[i] = va_arg(arguments, id); + + if (objects[i] == nil) + @throw [OFInvalidArgumentException exception]; + + i++; while ((key = va_arg(arguments, id)) != nil && (object = va_arg(arguments, id)) != nil) { OFEnsure(i < count);