[gthumb] catalogs: do not try to set the metadata if an error occurs
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] catalogs: do not try to set the metadata if an error occurs
- Date: Mon, 27 Jan 2020 17:14:15 +0000 (UTC)
commit adb786ab3680374478b1580b48690166d8f1e52a
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Jan 27 10:15:20 2020 +0100
catalogs: do not try to set the metadata if an error occurs
In that case the catalog is NULL.
extensions/catalogs/gth-file-source-catalogs.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/extensions/catalogs/gth-file-source-catalogs.c b/extensions/catalogs/gth-file-source-catalogs.c
index 02dc2147..86d38f6a 100644
--- a/extensions/catalogs/gth-file-source-catalogs.c
+++ b/extensions/catalogs/gth-file-source-catalogs.c
@@ -345,12 +345,15 @@ read_metadata_catalog_ready_cb (GObject *object,
{
ReadMetadataOpData *read_metadata = user_data;
- /* ignore errors */
- if (error != NULL)
+ if (error != NULL) {
+ /* ignore errors */
g_clear_error (&error);
-
- gth_catalog_update_metadata (GTH_CATALOG (object), read_metadata->file_data);
- g_object_unref (object);
+ }
+ else {
+ g_assert (object != NULL);
+ gth_catalog_update_metadata (GTH_CATALOG (object), read_metadata->file_data);
+ g_object_unref (object);
+ }
read_metadata->callback (G_OBJECT (read_metadata->file_source), error, read_metadata->data);
read_metadata_free (read_metadata);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]