diff options
author | Jannis Pohlmann <jannis@xfce.org> | 2010-02-26 19:34:36 +0100 |
---|---|---|
committer | Jannis Pohlmann <jannis@xfce.org> | 2010-02-26 19:34:36 +0100 |
commit | 2eb396988c63377c0ae9be74008cce339e70a044 (patch) | |
tree | eead2865d1c2bc0cc5bf99f64f6a9803a1ca2c0a /tumbler | |
parent | 2619211589771e4dd36f16a5766ab333615be45f (diff) | |
download | tumbler-2eb396988c63377c0ae9be74008cce339e70a044.tar.gz |
Allow TumblerFileInfos to be created with empty URIs/MIME types.
This is done to avoid warnings when someone forgets to send a MIME type
along with a thumbnail request etc. For empty URIs/MIME types, tumbler
will not find a thumbnailer and the broken elements will be reported
back to the client via the "Error" signal.
The original idea came from Philip Van Hoof <philip@codeminded.be>.
Diffstat (limited to 'tumbler')
-rw-r--r-- | tumbler/tumbler-file-info.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tumbler/tumbler-file-info.c b/tumbler/tumbler-file-info.c index c4f162d..37d5ae3 100644 --- a/tumbler/tumbler-file-info.c +++ b/tumbler/tumbler-file-info.c @@ -221,8 +221,8 @@ tumbler_file_info_new (const gchar *uri, const gchar *mime_type, TumblerThumbnailFlavor *flavor) { - 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 (uri != NULL, NULL); + g_return_val_if_fail (mime_type != NULL, 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, |