[gnome-color-manager: 11/18] trivial: don't emit a critical warning when calling gcm_profile_get_filename() on a profile not back
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager: 11/18] trivial: don't emit a critical warning when calling gcm_profile_get_filename() on a profile not back
- Date: Fri, 8 Oct 2010 16:09:05 +0000 (UTC)
commit 58bf62a03d210099b6b3a7a2e0f52f0fd0f8ea24
Author: Richard Hughes <richard hughsie com>
Date: Fri Oct 8 17:02:45 2010 +0100
trivial: don't emit a critical warning when calling gcm_profile_get_filename() on a profile not backed by a file
libcolor-glib/gcm-profile.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libcolor-glib/gcm-profile.c b/libcolor-glib/gcm-profile.c
index 3b3634f..04135d9 100644
--- a/libcolor-glib/gcm-profile.c
+++ b/libcolor-glib/gcm-profile.c
@@ -276,7 +276,7 @@ gcm_profile_get_filename (GcmProfile *profile)
g_return_val_if_fail (GCM_IS_PROFILE (profile), NULL);
/* this returns a const, so we have to track it internally */
- if (priv->filename == NULL)
+ if (priv->filename == NULL && priv->file != NULL)
priv->filename = g_file_get_path (priv->file);
return priv->filename;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]