1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Fix crash on Sparkle update when binary is replaced.

This commit is contained in:
Leo Franchi 2011-11-10 18:30:22 -05:00
parent edf47aefd1
commit f9b5bda925

View File

@ -22,6 +22,7 @@
#include "macshortcuthandler.h"
#include "config.h"
#include "tomahawkwindow.h"
#include "audio/audioengine.h"
#import <AppKit/NSApplication.h>
#import <Foundation/NSAutoreleasePool.h>
@ -54,6 +55,9 @@
- (Tomahawk::PlatformInterface*) application_handler;
- (void) setApplicationHandler: (Tomahawk::PlatformInterface*)handler;
// SUUpdaterDelegate
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
@end
@ -205,6 +209,13 @@
[super sendEvent: event];
}
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update
{
tLog() << "NSApp in willInstallUpdate, deleting Phonon objects";
AudioEngine::instance()->stop();
delete AudioEngine::instance();
}
@end
void Tomahawk::macMain() {