summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-ui-utilities.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2007-01-11 10:02:46 +0000
committerAlexander Larsson <alexl@src.gnome.org>2007-01-11 10:02:46 +0000
commit7ec88eadee046c44e027ff9099bdab64c0dafcec (patch)
tree3088f375cf8f8798130678e547d34b628526e150 /libnautilus-private/nautilus-ui-utilities.c
parentd586ea8161b22c5a4f767ab83eb81997c289468c (diff)
downloadnautilus-7ec88eadee046c44e027ff9099bdab64c0dafcec.tar.gz
Handle ui file load error better. Patch from Tom Parker
2007-01-11 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-ui-utilities.c: (nautilus_ui_string_get): Handle ui file load error better. Patch from Tom Parker svn path=/trunk/; revision=12689
Diffstat (limited to 'libnautilus-private/nautilus-ui-utilities.c')
-rw-r--r--libnautilus-private/nautilus-ui-utilities.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-ui-utilities.c b/libnautilus-private/nautilus-ui-utilities.c
index 502145db2..a3a833d96 100644
--- a/libnautilus-private/nautilus-ui-utilities.c
+++ b/libnautilus-private/nautilus-ui-utilities.c
@@ -94,7 +94,7 @@ nautilus_ui_string_get (const char *filename)
ui = g_hash_table_lookup (ui_cache, filename);
if (ui == NULL) {
path = nautilus_ui_file (filename);
- if (!g_file_get_contents (path, &ui, NULL, NULL)) {
+ if (path == NULL || !g_file_get_contents (path, &ui, NULL, NULL)) {
g_warning ("Unable to load ui file %s\n", filename);
}
g_free (path);