Permalink
Browse files

Merge branch 'master' of github.com:robbiehanson/CocoaLumberjack

  • Loading branch information...
2 parents 3dfde95 + a494160 commit 2342727a6f90854846259320e6c969b872ff26be @robbiehanson robbiehanson committed Dec 8, 2012
Showing with 12 additions and 10 deletions.
  1. +12 −10 Lumberjack/DDAbstractDatabaseLogger.m
View
22 Lumberjack/DDAbstractDatabaseLogger.m
@@ -220,16 +220,18 @@ - (void)createAndStartDeleteTimer
if ((deleteTimer == NULL) && (deleteInterval > 0.0) && (maxAge > 0.0))
{
deleteTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, loggerQueue);
-
- dispatch_source_set_event_handler(deleteTimer, ^{ @autoreleasepool {
-
- [self performDelete];
-
- }});
-
- [self updateDeleteTimer];
-
- dispatch_resume(deleteTimer);
+
+ if (deleteTimer != NULL) {
+ dispatch_source_set_event_handler(deleteTimer, ^{ @autoreleasepool {
+
+ [self performDelete];
+
+ }});
+
+ [self updateDeleteTimer];
+
+ dispatch_resume(deleteTimer);
+ }
}
}

0 comments on commit 2342727

Please sign in to comment.