[vlc-commits] macosx: correctly unregister input-current callback
David Fuhrmann
git at videolan.org
Wed Aug 12 13:25:35 CEST 2015
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Aug 12 12:17:47 2015 +0200| [f2f58c1b2e69739da1643238c27e0fb692de8323] | committer: David Fuhrmann
macosx: correctly unregister input-current callback
Fixes a crash when quitting the interface during media playback.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2f58c1b2e69739da1643238c27e0fb692de8323
---
modules/gui/macosx/InputManager.m | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/InputManager.m b/modules/gui/macosx/InputManager.m
index 4c4a489..b881221 100644
--- a/modules/gui/macosx/InputManager.m
+++ b/modules/gui/macosx/InputManager.m
@@ -166,7 +166,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
- (void)dealloc
{
- intf_thread_t *p_intf = VLCIntf;
+ msg_Dbg(VLCIntf, "Deinitializing input manager");
if (p_current_input) {
/* continue playback where you left off */
[[o_main playlist] storePlaybackPositionForItem:p_current_input];
@@ -176,8 +176,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
p_current_input = NULL;
}
- if (p_intf)
- var_DelCallback(p_intf, "input-current", InputThreadChanged, (__bridge void *)self);
+ var_DelCallback(pl_Get(VLCIntf), "input-current", InputThreadChanged, (__bridge void *)self);
dispatch_release(informInputChangedQueue);
}
More information about the vlc-commits
mailing list