changeset 36090:f658e29184e0

Check return value to avoid segmentation fault.
author ib
date Mon, 29 Apr 2013 12:13:07 +0000
parents d4056035c260
children 101225a6ed42
files gui/dialog/url.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/url.c	Mon Apr 29 12:10:03 2013 +0000
+++ b/gui/dialog/url.c	Mon Apr 29 12:13:07 2013 +0000
@@ -66,8 +66,11 @@
                 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);