[vlc-devel] commit: skins2: skins2 interface cannot be used if no playlist is available (Erwan Tulou )

git version control git at videolan.org
Sat Sep 19 18:25:06 CEST 2009


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Sat Sep 19 18:09:46 2009 +0200| [18a12248f635ac599ee7f13087600c2b3d918615] | committer: Erwan Tulou 

skins2: skins2 interface cannot be used if no playlist is available

Better not start skins2 at all than crash later on, since playlist is taken for granted throughout the code.

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

 modules/gui/skins2/src/skin_main.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 4c6bbbc..6aa0e47 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -106,6 +106,11 @@ static int Open( vlc_object_t *p_this )
 
     p_intf->p_sys->p_input = NULL;
     p_intf->p_sys->p_playlist = pl_Hold( p_intf );
+    if( !p_intf->p_sys->p_playlist )
+    {
+        free( p_intf->p_sys );
+        return VLC_EGENERIC;
+    }
 
     // Initialize "singleton" objects
     p_intf->p_sys->p_logger = NULL;




More information about the vlc-devel mailing list