diff --git a/macosx/Controller.m b/macosx/Controller.m index 28d1011fb..cd6014c83 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -506,8 +506,12 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy //stop timers [fTimer invalidate]; [fSpeedLimitTimer invalidate]; - if (fAutoImportTimer && [fAutoImportTimer isValid]) - [fAutoImportTimer invalidate]; + if (fAutoImportTimer) + { + if ([fAutoImportTimer isValid]) + [fAutoImportTimer invalidate]; + [fAutoImportTimer release]; + } //save history and stop running torrents [self updateTorrentHistory];