searchengine: Add missing sanity check

This commit is contained in:
Gaël Bonithon 2023-02-09 19:25:04 +01:00
parent 45e6e9a7d1
commit 41490f9624

View File

@ -97,8 +97,11 @@ finalize (GObject *object)
g_clear_object (&engine->search_query);
g_clear_object (&engine->search_location_query);
tracker_sparql_connection_close (engine->sparql_conn);
g_clear_object (&engine->sparql_conn);
if (engine->sparql_conn != NULL)
{
tracker_sparql_connection_close (engine->sparql_conn);
g_clear_object (&engine->sparql_conn);
}
G_OBJECT_CLASS (gtk_search_engine_tracker3_parent_class)->finalize (object);
}