quicksilver/Quicksilver — pull request #880 by pjrobertson (2012-05-11 17:44:31+00:00)
Title: Fix crash on writing catalog to disk

When writing the catalog .plist to disk, don't let the catalog itself be edited.

This fixes the following crash:

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
objc[504]: garbage collection is OFF
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSCFDictionary: 0x90dc210> was mutated while being enumerated.'
*** Call stack at first throw:
(
0 CoreFoundation 0x9a80eb67 __raiseError + 231
1 libobjc.A.dylib 0x94912149 objc_exception_throw + 155
2 CoreFoundation 0x9a80e651 __NSFastEnumerationMutationHandler + 177
3 CoreFoundation 0x9a74a26d -[__NSFastEnumerationEnumerator nextObject] + 429
4 Foundation 0x936835e6 _NSIsPList + 707
5 Foundation 0x9368363c _NSIsPList + 793
6 Foundation 0x936834ef _NSIsPList + 460
7 Foundation 0x936ffcc1 -[NSArray(NSArray) writeToFile:atomically:] + 61
8 QSCore 0x000a0f30 -[QSCatalogEntry saveIndex] + 255