[gthumb/gthumb-2-10] Fixed bug that broke version 2.10 after using version 2.11
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-2-10] Fixed bug that broke version 2.10 after using version 2.11
- Date: Wed, 5 May 2010 10:54:28 +0000 (UTC)
commit 332d561acbfd87018551157d6ba1e2664b78fecc
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed May 5 09:16:11 2010 +0200
Fixed bug that broke version 2.10 after using version 2.11
libgthumb/comments.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/libgthumb/comments.c b/libgthumb/comments.c
index 39275c5..4f50f79 100644
--- a/libgthumb/comments.c
+++ b/libgthumb/comments.c
@@ -216,7 +216,7 @@ comments_get_comment_filename (const char *uri,
char *filename = NULL;
char *comment_uri = NULL;
- if (uri == NULL)
+ if (uri == NULL)
return NULL;
source_real = g_strdup (uri);
@@ -230,7 +230,7 @@ comments_get_comment_filename (const char *uri,
if (result == GNOME_VFS_OK) {
g_free (source_real);
source_real = resolved;
- }
+ }
else
g_free (resolved);
}
@@ -270,8 +270,8 @@ load_comment_from_iptc (const char *uri)
d = iptc_data_new_from_jpeg (local_file);
g_free (local_file);
-
- if (d == NULL)
+
+ if (d == NULL)
return NULL;
data = comment_data_new ();
@@ -565,7 +565,7 @@ delete_comment_iptc (const char *uri)
save_iptc_data (local_file, d);
iptc_data_unref (d);
g_free (local_file);
-
+
set_file_mtime (uri, mtime);
}
@@ -739,13 +739,15 @@ load_comment_from_xml (const char *uri)
g_free (comment_uri);
g_free (local_file);
-
- if (doc == NULL)
+
+ if (doc == NULL)
return NULL;
-
+
data = comment_data_new ();
root = xmlDocGetRootElement (doc);
format = xmlGetProp (root, FORMAT_TAG);
+ if (format == NULL)
+ return NULL;
if (strcmp ((char*)format, "1.0") == 0)
data->utf8_format = FALSE;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]