[vlc-devel] commit: Extensions: do not wait on widget if dialog is deleted ( Jean-Philippe André )

git version control git at videolan.org
Thu Feb 4 02:01:07 CET 2010


vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Thu Feb  4 00:49:21 2010 +0100| [193f0371f07d7f394ec5c3f9379a17271870fd7b] | committer: Jean-Philippe André 

Extensions: do not wait on widget if dialog is deleted

If the dialog is about to be deleted, it's too late to care about
the widget (it has already been removed from the UI).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=193f0371f07d7f394ec5c3f9379a17271870fd7b
---

 modules/misc/lua/libs/dialog.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/misc/lua/libs/dialog.c b/modules/misc/lua/libs/dialog.c
index ffb2ec0..2364dc6 100644
--- a/modules/misc/lua/libs/dialog.c
+++ b/modules/misc/lua/libs/dialog.c
@@ -862,8 +862,12 @@ static int vlclua_dialog_delete_widget( lua_State *L )
 
     vlc_mutex_lock( &p_dlg->lock );
 
-    /* Same remarks as for dialog delete */
-    while( p_widget->p_sys_intf != NULL )
+    /* Same remarks as for dialog delete.
+     * If the dialog is deleted or about to be deleted, then there is no
+     * need to wait on this particular widget that already doesn't exist
+     * anymore in the UI */
+    while( p_widget->p_sys_intf != NULL && !p_dlg->b_kill
+           && p_dlg->p_sys_intf != NULL )
     {
         vlc_cond_wait( &p_dlg->cond, &p_dlg->lock );
     }




More information about the vlc-devel mailing list