[tracker/wip/carlosg/resources-as-cursors: 5/18] libtracker-sparql: Prepare deserializer for NULL input streams
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/resources-as-cursors: 5/18] libtracker-sparql: Prepare deserializer for NULL input streams
- Date: Mon, 11 Jul 2022 18:57:49 +0000 (UTC)
commit f5e2415c8cb41c988827db3fb4b69e7b139414b1
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jul 2 23:28:36 2022 +0200
libtracker-sparql: Prepare deserializer for NULL input streams
There will be other subclasses that use no streams.
src/libtracker-sparql/tracker-deserializer.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-deserializer.c b/src/libtracker-sparql/tracker-deserializer.c
index 2ddf93523..b1ea33331 100644
--- a/src/libtracker-sparql/tracker-deserializer.c
+++ b/src/libtracker-sparql/tracker-deserializer.c
@@ -55,7 +55,7 @@ tracker_deserializer_finalize (GObject *object)
TrackerDeserializerPrivate *priv =
tracker_deserializer_get_instance_private (deserializer);
- g_object_unref (priv->stream);
+ g_clear_object (&priv->stream);
g_clear_object (&priv->namespaces);
G_OBJECT_CLASS (tracker_deserializer_parent_class)->finalize (object);
@@ -121,7 +121,8 @@ tracker_deserializer_close (TrackerSparqlCursor *cursor)
TrackerDeserializerPrivate *priv =
tracker_deserializer_get_instance_private (deserializer);
- g_input_stream_close (priv->stream, NULL, NULL);
+ if (priv->stream)
+ g_input_stream_close (priv->stream, NULL, NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]