[MPlayer-cvslog] r38566 - trunk/gui/dialog/skinbrowser.c

ib subversion at mplayerhq.hu
Fri Jun 14 13:40:32 EEST 2024


Author: ib
Date: Fri Jun 14 13:40:32 2024
New Revision: 38566

Log:
Set sbSelectedSkin explicitly to NULL when creating the dialog.

If the currently used skin cannot be found in SkinList and the user
selects a skin for testing but cancels it, sbSelectedSkin will point
to freed memory afterwards.

Modified:
   trunk/gui/dialog/skinbrowser.c

Modified: trunk/gui/dialog/skinbrowser.c
==============================================================================
--- trunk/gui/dialog/skinbrowser.c	Fri Jun 14 13:32:34 2024	(r38565)
+++ trunk/gui/dialog/skinbrowser.c	Fri Jun 14 13:40:32 2024	(r38566)
@@ -37,7 +37,7 @@
 #include "dialog.h"
 
 static GtkWidget *SkinList;
-char      * sbSelectedSkin=NULL;
+static char *sbSelectedSkin;
 
 static char *prevSelected;
 
@@ -214,6 +214,8 @@ void ShowSkinBrowser (void)
   }
   else SkinBrowser = CreateSkinBrowser();
 
+  sbSelectedSkin = NULL;
+
   FillSkinList(skinDirInHome);
   FillSkinList(skinDirInData);
 


More information about the MPlayer-cvslog mailing list