[maemo-commits] [maemo-commits] r16546 - projects/haf/trunk/hildon-thumbnail/thumbs
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Oct 31 16:28:50 EET 2008
- Previous message: [maemo-commits] r16545 - in projects/haf/trunk/hildon-thumbnail: . thumbs
- Next message: [maemo-commits] r16547 - projects/haf/trunk/hildon-thumbnail/thumbs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: pvanhoof
Date: 2008-10-31 16:28:49 +0200 (Fri, 31 Oct 2008)
New Revision: 16546
Modified:
projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-obj.c
Log:
Bugfixes
Modified: projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-obj.c
===================================================================
--- projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-obj.c 2008-10-31 14:26:07 UTC (rev 16545)
+++ projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-obj.c 2008-10-31 14:28:49 UTC (rev 16546)
@@ -87,6 +87,7 @@
GInputStream *stream = NULL;
GdkPixbuf *pixbuf = NULL;
GError *error = NULL;
+ gboolean err_d = FALSE;
/* Determine the exact type of thumbnail being requested */
@@ -98,7 +99,7 @@
} else {
filei = local;
}
- } else if (r_priv->width > 128) {
+ } else if (r_priv->width >= 128) {
local = g_file_new_for_uri (r_priv->lpaths[1]);
if (!g_file_query_exists (local, NULL)) {
filei = g_file_new_for_path (r_priv->paths[1]);
@@ -131,6 +132,7 @@
/* Callback user function, passing the pixbuf and error */
if (r_priv->errors) {
+ err_d = TRUE;
if (!error)
g_set_error (&error, FACTORY_ERROR, 0, r_priv->errors->str);
else {
@@ -149,9 +151,6 @@
g_object_unref (stream);
}
- if (error)
- g_error_free (error);
-
if (pixbuf)
gdk_pixbuf_unref (pixbuf);
}
@@ -159,7 +158,7 @@
if (r_priv->ucallback) {
gchar *u = g_file_get_uri (filei);
- if (r_priv->errors) {
+ if (r_priv->errors && !err_d) {
if (!error)
g_set_error (&error, FACTORY_ERROR, 0, r_priv->errors->str);
else {
@@ -176,6 +175,9 @@
if (filei)
g_object_unref (filei);
+ if (error)
+ g_error_free (error);
+
if (r_priv->destroy)
r_priv->destroy (r_priv->user_data);
- Previous message: [maemo-commits] r16545 - in projects/haf/trunk/hildon-thumbnail: . thumbs
- Next message: [maemo-commits] r16547 - projects/haf/trunk/hildon-thumbnail/thumbs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
