[gnome-software] Fix compile warning in the new folder code
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix compile warning in the new folder code
- Date: Thu, 23 Jan 2014 09:50:48 +0000 (UTC)
commit 35bbb129883d9802fab778453fbd25bab9e4bf74
Author: Richard Hughes <richard hughsie com>
Date: Thu Jan 23 09:50:41 2014 +0000
Fix compile warning in the new folder code
src/gs-folders.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-folders.c b/src/gs-folders.c
index b7f7a61..a76c3b3 100644
--- a/src/gs-folders.c
+++ b/src/gs-folders.c
@@ -396,12 +396,13 @@ gs_folders_remove_folder (GsFolders *folders, const gchar *id)
g_hash_table_iter_init (&iter, folders->priv->categories);
while (g_hash_table_iter_next (&iter, NULL, (gpointer*)folder)) {
- if (g_strcmp0 (id, folder->id) == 0) {
+ if (folder && g_strcmp0 (id, folder->id) == 0) {
g_hash_table_iter_remove (&iter);
}
}
- g_hash_table_remove (folders->priv->folders, folder->id);
+ if (folder != NULL)
+ g_hash_table_remove (folders->priv->folders, folder->id);
}
const gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]