[gthumb] ignore null uris at startup
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] ignore null uris at startup
- Date: Sun, 17 Jul 2011 17:29:20 +0000 (UTC)
commit 8c6b4e3d7b825ecf4619cd131d462b630c9a8f9b
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Jul 17 11:06:14 2011 +0200
ignore null uris at startup
gthumb/main.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/main.c b/gthumb/main.c
index 93c2d55..32595b0 100644
--- a/gthumb/main.c
+++ b/gthumb/main.c
@@ -463,14 +463,17 @@ prepare_application (void)
if (remaining_args == NULL) { /* No location specified. */
GFile *location;
char *current_file_uri;
- GFile *current_file;
+ GFile *current_file;
location = g_file_new_for_uri (gth_pref_get_startup_location ());
current_file_uri = eel_gconf_get_path (PREF_STARTUP_CURRENT_FILE, NULL);
- current_file = g_file_new_for_uri (current_file_uri);
+ if (current_file_uri != NULL)
+ current_file = g_file_new_for_uri (current_file_uri);
+ else
+ current_file = NULL;
open_browser_window (location, current_file);
- g_object_unref (current_file);
+ _g_object_unref (current_file);
g_free (current_file_uri);
g_object_unref (location);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]