[vlc-commits] lua: Destroy the callback before destroying the variable
Hugo Beauzée-Luyssen
git at videolan.org
Wed Dec 16 16:07:55 CET 2015
vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Dec 8 18:27:21 2015 +0100| [c621fad699a541cdce524aff320482b47645d9e0] | committer: Jean-Baptiste Kempf
lua: Destroy the callback before destroying the variable
(cherry picked from commit ea1db09becdfe6b05233f312592c33d63c025f96)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=c621fad699a541cdce524aff320482b47645d9e0
---
modules/lua/extension.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/lua/extension.c b/modules/lua/extension.c
index 5958af1..9546e4c 100644
--- a/modules/lua/extension.c
+++ b/modules/lua/extension.c
@@ -141,6 +141,8 @@ void Close_Extension( vlc_object_t *p_this )
p_mgr->p_sys->b_killed = true;
vlc_mutex_unlock( &p_mgr->lock );
+ var_DelCallback( p_this, "dialog-event",
+ vlclua_extension_dialog_callback, NULL );
var_Destroy( p_mgr, "dialog-event" );
extension_t *p_ext = NULL;
@@ -188,9 +190,6 @@ void Close_Extension( vlc_object_t *p_this )
FOREACH_END()
ARRAY_RESET( p_mgr->extensions );
-
- var_DelCallback( p_this, "dialog-event",
- vlclua_extension_dialog_callback, NULL );
}
/**
More information about the vlc-commits
mailing list