[gthumb] check whether gio_file is null before using it
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] check whether gio_file is null before using it
- Date: Thu, 14 Jul 2011 19:19:11 +0000 (UTC)
commit cbc1844e74f710fc7efc9b47904ec6ebb545b07b
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Jul 14 21:17:12 2011 +0200
check whether gio_file is null before using it
extensions/catalogs/actions.c | 2 +-
extensions/catalogs/dlg-add-to-catalog.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/catalogs/actions.c b/extensions/catalogs/actions.c
index 012060e..a64d6a8 100644
--- a/extensions/catalogs/actions.c
+++ b/extensions/catalogs/actions.c
@@ -247,7 +247,7 @@ new_library_dialog_response_cb (GtkWidget *dialog,
file_source = gth_main_get_file_source (parent);
gio_parent = gth_file_source_to_gio_file (file_source, parent);
gio_file = g_file_get_child_for_display_name (gio_parent, name, &error);
- if (g_file_make_directory (gio_file, NULL, &error)) {
+ if ((gio_file != NULL) && g_file_make_directory (gio_file, NULL, &error)) {
GFile *file;
GList *list;
diff --git a/extensions/catalogs/dlg-add-to-catalog.c b/extensions/catalogs/dlg-add-to-catalog.c
index 3063afc..ee0279c 100644
--- a/extensions/catalogs/dlg-add-to-catalog.c
+++ b/extensions/catalogs/dlg-add-to-catalog.c
@@ -428,7 +428,7 @@ new_library_dialog_response_cb (GtkWidget *dialog,
file_source = gth_main_get_file_source (parent);
gio_parent = gth_file_source_to_gio_file (file_source, parent);
gio_file = _g_directory_create_unique (gio_parent, name, "", &error);
- if (g_file_make_directory (gio_file, NULL, &error)) {
+ if ((gio_file != NULL) && g_file_make_directory (gio_file, NULL, &error)) {
GFile *file;
GList *list;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]