[PATCH] Corrects crashing when a skin doesn't have a video =

Joseph Tulou brezhoneg1 at yahoo.fr
Wed Feb 18 16:57:55 CET 2009


widget.=0A=
=0A=
---=0A=
 modules/gui/qt4/qt4.cpp              |    9 ++++++---=0A=
 modules/gui/skins2/src/skin_main.cpp |   14 ++++++++++----=0A=
 2 files changed, 16 insertions(+), 7 deletions(-)=0A=
=0A=
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp=0A=
index 15a8f88..3d4cda2 100644=0A=
--- a/modules/gui/qt4/qt4.cpp=0A=
+++ b/modules/gui/qt4/qt4.cpp=0A=
@@ -293,9 +293,12 @@ static int Open( vlc_object_t *p_this )=0A=
 =0A=
     while( p_sys->p_mi =3D=3D NULL && !p_sys->b_isDialogProvider )=0A=
         iface.ready.wait( &iface.lock );=0A=
-    var_Create (p_this->p_libvlc, "qt4-iface", VLC_VAR_ADDRESS);=0A=
-    val.p_address =3D p_this;=0A=
-    var_Set (p_this->p_libvlc, "qt4-iface", val);=0A=
+    if( !p_sys->b_isDialogProvider )=0A=
+    {=0A=
+        var_Create (p_this->p_libvlc, "qt4-iface", VLC_VAR_ADDRESS);=0A=
+        val.p_address =3D p_this;=0A=
+        var_Set (p_this->p_libvlc, "qt4-iface", val);=0A=
+    }=0A=
     return VLC_SUCCESS;=0A=
 }=0A=
 =0A=
diff --git a/modules/gui/skins2/src/skin_main.cpp =
b/modules/gui/skins2/src/skin_main.cpp=0A=
index a116e75..be5bb55 100644=0A=
--- a/modules/gui/skins2/src/skin_main.cpp=0A=
+++ b/modules/gui/skins2/src/skin_main.cpp=0A=
@@ -305,12 +305,18 @@ static int WindowOpen( vlc_object_t *p_this )=0A=
     pWnd->handle.hwnd =3D VlcProc::getWindow( pIntf, pWnd->vout,=0A=
                                        &pWnd->pos_x, &pWnd->pos_y,=0A=
                                        &pWnd->width, &pWnd->height );=0A=
-    pWnd->p_private =3D pIntf;=0A=
-    pWnd->control =3D &VlcProc::controlWindow;=0A=
-    return VLC_SUCCESS;=0A=
+    if( pWnd->handle.hwnd )=0A=
+    {=0A=
+        pWnd->p_private =3D pIntf;=0A=
+        pWnd->control =3D &VlcProc::controlWindow;=0A=
+        return VLC_SUCCESS;=0A=
+    }=0A=
+    else=0A=
+    {=0A=
+        return VLC_EGENERIC;=0A=
+    }=0A=
 }=0A=
 =0A=
-=0A=
 static void WindowClose( vlc_object_t *p_this )=0A=
 {=0A=
     vout_window_t *pWnd =3D (vout_window_t *)p_this;=0A=
-- =0A=
1.5.2.5=0A=
=0A=

------=_NextPart_000_0032_01C99229.B90385A0--




More information about the vlc-devel mailing list