[gthumb] ignore null lists
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] ignore null lists
- Date: Fri, 16 Jul 2010 07:19:30 +0000 (UTC)
commit 5b8b267a5e80846a479b193a2e94c2d311c7e26a
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Jul 16 09:04:11 2010 +0200
ignore null lists
gthumb/gth-string-list.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-string-list.c b/gthumb/gth-string-list.c
index e159403..5f541f1 100644
--- a/gthumb/gth-string-list.c
+++ b/gthumb/gth-string-list.c
@@ -190,6 +190,11 @@ gth_string_list_append (GthStringList *list1,
{
GList *scan;
+ g_return_if_fail (GTH_IS_STRING_LIST (list1));
+
+ if (list2 == NULL)
+ return;
+
for (scan = list2->priv->list; scan; scan = scan->next)
if (! g_list_find_custom (list1->priv->list, scan->data, (GCompareFunc) strcmp))
list1->priv->list = g_list_append (list1->priv->list, g_strdup (scan->data));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]