Commit a8291189 authored by Joseph Tulou's avatar Joseph Tulou Committed by Jean-Baptiste Kempf

Corrects crashing when a skin doesn't have a video widget.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@sasmira.jbkempf.com>
parent 521b3b3d
...@@ -293,9 +293,12 @@ static int Open( vlc_object_t *p_this ) ...@@ -293,9 +293,12 @@ static int Open( vlc_object_t *p_this )
while( p_sys->p_mi == NULL && !p_sys->b_isDialogProvider ) while( p_sys->p_mi == NULL && !p_sys->b_isDialogProvider )
iface.ready.wait( &iface.lock ); iface.ready.wait( &iface.lock );
var_Create (p_this->p_libvlc, "qt4-iface", VLC_VAR_ADDRESS); if( !p_sys->b_isDialogProvider )
val.p_address = p_this; {
var_Set (p_this->p_libvlc, "qt4-iface", val); var_Create (p_this->p_libvlc, "qt4-iface", VLC_VAR_ADDRESS);
val.p_address = p_this;
var_Set (p_this->p_libvlc, "qt4-iface", val);
}
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -305,12 +305,18 @@ static int WindowOpen( vlc_object_t *p_this ) ...@@ -305,12 +305,18 @@ static int WindowOpen( vlc_object_t *p_this )
pWnd->handle.hwnd = VlcProc::getWindow( pIntf, pWnd->vout, pWnd->handle.hwnd = VlcProc::getWindow( pIntf, pWnd->vout,
&pWnd->pos_x, &pWnd->pos_y, &pWnd->pos_x, &pWnd->pos_y,
&pWnd->width, &pWnd->height ); &pWnd->width, &pWnd->height );
pWnd->p_private = pIntf; if( pWnd->handle.hwnd )
pWnd->control = &VlcProc::controlWindow; {
return VLC_SUCCESS; pWnd->p_private = pIntf;
pWnd->control = &VlcProc::controlWindow;
return VLC_SUCCESS;
}
else
{
return VLC_EGENERIC;
}
} }
static void WindowClose( vlc_object_t *p_this ) static void WindowClose( vlc_object_t *p_this )
{ {
vout_window_t *pWnd = (vout_window_t *)p_this; vout_window_t *pWnd = (vout_window_t *)p_this;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment