]> git.sesse.net Git - vlc/commitdiff
check for enomem
authorChristophe Mutricy <xtophe@videolan.org>
Thu, 1 Feb 2007 20:06:54 +0000 (20:06 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Thu, 1 Feb 2007 20:06:54 +0000 (20:06 +0000)
modules/gui/qt4/qt4.cpp

index 18dc637656025eabf590be5358c227b065c05c50..8e522e31d7e26cef0a251d99b355c25859040135 100644 (file)
@@ -45,7 +45,7 @@ static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
 vlc_module_begin();
     set_shortname( (char *)"Qt" );
     set_description( (char*)_("Qt interface") );
-    set_category( CAT_INTERFACE) ;
+    set_category( CAT_INTERFACE ) ;
     set_subcategory( SUBCAT_INTERFACE_MAIN );
     set_capability( "interface", 100 );
     set_callbacks( Open, Close );
@@ -69,6 +69,11 @@ static int Open( vlc_object_t *p_this )
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
     p_intf->pf_run = Run;
     p_intf->p_sys = (intf_sys_t *)malloc(sizeof( intf_sys_t ) );
+    if( !p_intf->p_sys )
+    {
+        msg_Err(p_intf, "Out of memory");
+        return VLC_ENOMEM;
+    }
     memset( p_intf->p_sys, 0, sizeof( intf_sys_t ) );
 
     p_intf->p_sys->p_playlist = pl_Yield( p_intf );