quicksilver/Quicksilver — pull request #878 by pjrobertson (2012-05-11 12:54:31+00:00)
Title: Validate all setObject:ForKey: methods in QSObject.m to ensure nil isn't...

... being set

There was a crash report with the following info. It could possible be because the method `setObject:anObject forKey:aKey` had a nil `anObject` or `aKey`. Even if that's not the cause of the crash, we shouldn't try and use the methods if either of the parameters are nil.

From the docs...
> Raises an NSInvalidArgumentException if aKey or anObject is nil. If you need to represent a nil value in the dictionary, use NSNull.

Version: ß68 (3927)
Code Type: X86 (Native)
Parent Process: ??? [1]

Date/Time: 2012-05-10 18:19:17.851 -0400
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9

Crashed Thread: 4

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000069746361

VM Regions Near 0x69746361:
CG raster data 000000000cf95000-000000000cfa6000 [ 68K] rw-/rwx SM=COW
-->
__TEXT 000000008fe89000-000000008febc000 [ 204K] r-x/rwx SM=CO

Thread 4 Crashed:
0 libobjc.A.dylib	0x97908d47 objc_msgSend + 23
1 com.apple.CoreFoundation	0x938072d9 CFRelease + 169
2 com.apple.CoreFoundation	0x9381580f __CFDictionaryStandardReleaseKey + 79
3 com.apple.CoreFoundation	0x9380c8e1 __CFBasicHashAddValue + 1377
4 com.apple.CoreFoundation	0x9380c317 CFBasicHashSetValue + 2759
5 com.apple.CoreFoundation	0x9380b804 CFDictionarySetValue + 228
6 com.apple.CoreFoundation	0x93864122 -[__NSCFDictionary setObject:forKey:] + 306
7 com.blacktree.QSCore	0x000ae6b9 -[QSObject setObject:forMeta:] + 55
8 com.blacktree.QSCore	0x000a0edf -[QSCatalogEntry scannedObjects] + 208