From 7263bc50139992d2dd4d67233260b24e438dddc0 Mon Sep 17 00:00:00 2001 From: Ricardo Mones Date: Mon, 24 Jul 2017 09:35:05 +0200 Subject: [PATCH] Really handle the NULLs, don't scream at them --- src/prefs_themes.c | 4 +++- src/stock_pixmap.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/prefs_themes.c b/src/prefs_themes.c index 7472c53a6..820dff327 100644 --- a/src/prefs_themes.c +++ b/src/prefs_themes.c @@ -420,7 +420,9 @@ static void prefs_themes_free_names(ThemesData *tdata) GList *names; cm_return_if_fail(tdata != NULL); - cm_return_if_fail(tdata->names != NULL); + + if (tdata->names == NULL) + return; names = tdata->names; while (names != NULL) { diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c index 807d862a5..593b502e1 100644 --- a/src/stock_pixmap.c +++ b/src/stock_pixmap.c @@ -840,7 +840,8 @@ void stock_pixmap_themes_list_free(GList *list) { GList *ptr; - cm_return_if_fail(list != NULL); + if (list == NULL) + return; for (ptr = g_list_first(list); ptr != NULL; ptr = g_list_next(ptr)) g_free(ptr->data); -- 2.25.1