From 3e85e46ba68f19b96a1e461e3fe039f4f61d6526 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sat, 14 Apr 2012 14:33:08 +0000 Subject: - Fix crashes on use of custom query autocompletion when the database structure is still being retrieved --- Source/SPNarrowDownCompletion.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 4dc2711d..db3f5e3a 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -153,11 +153,11 @@ - (void)dealloc { [NSObject cancelPreviousPerformRequestsWithTarget:self]; - if(stateTimer != nil) { + if (stateTimer != nil) { [stateTimer invalidate]; [stateTimer release]; + stateTimer = nil; } - stateTimer = nil; if (staticPrefix) [staticPrefix release]; [mutablePrefix release]; [textualInputCharacters release]; @@ -178,6 +178,7 @@ if (stateTimer != nil) { [stateTimer invalidate]; [stateTimer release]; + stateTimer = nil; } closeMe = YES; -- cgit v1.2.3