[nautilus] batch-rename-utilities: protect against null error
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] batch-rename-utilities: protect against null error
- Date: Wed, 31 Aug 2016 13:16:20 +0000 (UTC)
commit cfa0d2c558f7c0f876f61da771e55caf7002e55c
Author: Carlos Soriano <csoriano gnome org>
Date: Wed Aug 31 15:14:48 2016 +0200
batch-rename-utilities: protect against null error
https://bugzilla.gnome.org/show_bug.cgi?id=770586
src/nautilus-batch-rename-utilities.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-batch-rename-utilities.c b/src/nautilus-batch-rename-utilities.c
index 7b4196c..03158c0 100644
--- a/src/nautilus-batch-rename-utilities.c
+++ b/src/nautilus-batch-rename-utilities.c
@@ -745,9 +745,12 @@ on_cursor_callback (GObject *object,
success = tracker_sparql_cursor_next_finish (cursor, result, &error);
if (!success)
{
- g_warning ("Error on batch rename tracker query cursor: %s", error->message);
+ if (error)
+ {
+ g_warning ("Error on batch rename tracker query cursor: %s", error->message);
+ g_error_free (error);
+ }
- g_clear_error (&error);
g_clear_object (&cursor);
nautilus_batch_rename_dialog_query_finished (query_data->dialog,
@@ -1131,8 +1134,11 @@ check_metadata_for_selection (NautilusBatchRenameDialog *dialog,
connection = tracker_sparql_connection_get (NULL, &error);
if (!connection)
{
- g_warning ("Error on batch rename tracker connection: %s", error->message);
- g_error_free (error);
+ if (error)
+ {
+ g_warning ("Error on batch rename tracker connection: %s", error->message);
+ g_error_free (error);
+ }
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]