diff options
author | Jannis Pohlmann <jannis@xfce.org> | 2010-01-07 10:05:25 +0100 |
---|---|---|
committer | Jannis Pohlmann <jannis@xfce.org> | 2010-01-07 10:09:42 +0100 |
commit | e461ed713aee38e8e62fd66e0f8db71384a27eaf (patch) | |
tree | 9d0f3bb677c719f3e482a1e8b04a920cf66f9299 /tumbler/tumbler-file-info.c | |
parent | 549c7b3bc44d2d67a94776bb49ce21a61d1aed28 (diff) | |
download | tumbler-e461ed713aee38e8e62fd66e0f8db71384a27eaf.tar.gz |
Report unsupported flavors back to clients via an error signal.
Thanks to Philip for the original commit.
Diffstat (limited to 'tumbler/tumbler-file-info.c')
-rw-r--r-- | tumbler/tumbler-file-info.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tumbler/tumbler-file-info.c b/tumbler/tumbler-file-info.c index 3ab47eb..c4f162d 100644 --- a/tumbler/tumbler-file-info.c +++ b/tumbler/tumbler-file-info.c @@ -145,7 +145,8 @@ tumbler_file_info_finalize (GObject *object) if (info->thumbnail != NULL) g_object_unref (info->thumbnail); - g_object_unref (info->flavor); + if (info->flavor != NULL) + g_object_unref (info->flavor); g_free (info->mime_type); g_free (info->uri); @@ -222,7 +223,7 @@ tumbler_file_info_new (const gchar *uri, { g_return_val_if_fail (uri != NULL && *uri != '\0', NULL); g_return_val_if_fail (mime_type != NULL && *mime_type != '\0', NULL); - g_return_val_if_fail (TUMBLER_IS_THUMBNAIL_FLAVOR (flavor), NULL); + g_return_val_if_fail (flavor == NULL || TUMBLER_IS_THUMBNAIL_FLAVOR (flavor), NULL); return g_object_new (TUMBLER_TYPE_FILE_INFO, "uri", uri, "mime-type", mime_type, "flavor", flavor, NULL); |