[gthumb] allow to set a NULL file_data without crasing
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] allow to set a NULL file_data without crasing
- Date: Sun, 9 Jan 2011 15:50:57 +0000 (UTC)
commit 9a25f49bd9376853108422b613c25066c503229e
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Jan 9 16:02:53 2011 +0100
allow to set a NULL file_data without crasing
gthumb/gth-sidebar.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-sidebar.c b/gthumb/gth-sidebar.c
index 87e1a07..3344cc9 100644
--- a/gthumb/gth-sidebar.c
+++ b/gthumb/gth-sidebar.c
@@ -152,7 +152,7 @@ gth_sidebar_set_file (GthSidebar *sidebar,
GList *children;
GList *scan;
- if (! g_file_info_get_attribute_boolean (file_data->info, "gth::file::is-modified"))
+ if ((file_data == NULL) || ! g_file_info_get_attribute_boolean (file_data->info, "gth::file::is-modified"))
gth_toolbox_deactivate_tool (GTH_TOOLBOX (sidebar->priv->toolbox));
children = gth_multipage_get_children (GTH_MULTIPAGE (sidebar->priv->properties));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]