[MPlayer-cvslog] r36184 - trunk/gui/dialog/url.c

ib subversion at mplayerhq.hu
Mon Apr 29 14:13:08 CEST 2013


Author: ib
Date: Mon Apr 29 14:13:07 2013
New Revision: 36184

Log:
Check return value to avoid segmentation fault.

Modified:
   trunk/gui/dialog/url.c

Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c	Mon Apr 29 14:10:03 2013	(r36183)
+++ trunk/gui/dialog/url.c	Mon Apr 29 14:13:07 2013	(r36184)
@@ -66,8 +66,11 @@ static void button_clicked(GtkButton *bu
                 add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND);
 
                 item      = calloc(1, sizeof(urlItem));
+
+                if (item) {
                 item->url = str;
                 listMgr(URLLIST_ITEM_ADD, item);
+                }
 
                 guiInfo.NewPlay = GUI_FILE_NEW;
                 uiEvent(evPlay, 0);


More information about the MPlayer-cvslog mailing list