X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_output%2Fmsw%2Fdirectx.c;h=cd8ed738c6450cde3a6bd868830b5db81172ee6e;hb=025c96ac36d5c8b98615e7de945f7d15284d3d41;hp=084968d7b4dcd587366063cb3a295c4c148233d5;hpb=8c16b6a8e89dfaced6868463079c5f2006346da7;p=vlc diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c index 084968d7b4..cd8ed738c6 100644 --- a/modules/video_output/msw/directx.c +++ b/modules/video_output/msw/directx.c @@ -2125,12 +2125,16 @@ static int WallpaperCallback( vlc_object_t *p_this, char const *psz_cmd, { playlist_t *p_playlist; - p_playlist = pl_Yield( p_this ); - /* Modify playlist as well because the vout might have to be - * restarted */ - var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL ); - var_Set( p_playlist, "directx-wallpaper", newval ); - vlc_object_release( p_playlist ); + p_playlist = vlc_object_find( p_this, + VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); + if( p_playlist ) + { + /* Modify playlist as well because the vout might have to be + * restarted */ + var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL ); + var_Set( p_playlist, "directx-wallpaper", newval ); + vlc_object_release( p_playlist ); + } p_vout->p_sys->i_changes |= DX_WALLPAPER_CHANGE; }