summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4a0855d)
raw | patch | inline | side by side (parent: 4a0855d)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Wed, 14 Jan 2009 21:10:00 +0000 (21:10 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Wed, 14 Jan 2009 21:10:00 +0000 (21:10 +0000) |
src/file.cpp | patch | blob | history |
diff --git a/src/file.cpp b/src/file.cpp
index 6fa5563c927cbd9813cca857359e33484a1ba69d..95c4d22cac4141fc9221c7ef0594c6ca5189127e 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
{
GtkRecentManager *recent = gtk_recent_manager_get_default();
gchar *fn = g_filename_from_utf8(uri, -1, NULL, NULL, NULL);
- gchar *uri_to_add = g_filename_to_uri(fn, NULL, NULL);
- if (uri_to_add) {
- gtk_recent_manager_add_item(recent, uri_to_add);
+ if (fn) {
+ gchar *uri_to_add = g_filename_to_uri(fn, NULL, NULL);
+ if (uri_to_add) {
+ gtk_recent_manager_add_item(recent, uri_to_add);
+ g_free(uri_to_add);
+ }
+ g_free(fn);
}
- g_free(uri_to_add);
- g_free(fn);
}