Fix resource leak in SPMediaKeyTap.
This commit is contained in:
parent
3156dc0f1a
commit
d78523e905
|
@ -57,6 +57,10 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv
|
||||||
if(!_app_switching_ref) return;
|
if(!_app_switching_ref) return;
|
||||||
RemoveEventHandler(_app_switching_ref);
|
RemoveEventHandler(_app_switching_ref);
|
||||||
_app_switching_ref = NULL;
|
_app_switching_ref = NULL;
|
||||||
|
|
||||||
|
if(!_app_terminating_ref) return;
|
||||||
|
RemoveEventHandler(_app_terminating_ref);
|
||||||
|
_app_terminating_ref = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)startWatchingMediaKeys
|
-(void)startWatchingMediaKeys
|
||||||
|
|
Loading…
Reference in New Issue