[gnome-commander] utils: allow pattern_list to be NULL in patlist_free()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] utils: allow pattern_list to be NULL in patlist_free()
- Date: Fri, 11 Nov 2011 17:12:46 +0000 (UTC)
commit 2c0165b707a92d92cdd26bba42a497b8bd7d91b6
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Fri Nov 11 14:59:32 2011 +0100
utils: allow pattern_list to be NULL in patlist_free()
src/utils.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/utils.cc b/src/utils.cc
index fc10680..4f34aae 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1281,7 +1281,7 @@ GList *patlist_new (const gchar *pattern_string)
void patlist_free (GList *pattern_list)
{
- g_return_if_fail (pattern_list != NULL);
+ if (!pattern_list) return;
g_list_foreach (pattern_list, (GFunc) g_free, NULL);
g_list_free (pattern_list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]