[tracker-miners: 2/3] Avoid null pointer warning




commit 24a9bb294039375a18464ff0325e750e673b6b20
Author: Pekka Vuorela <pekka vuorela jolla com>
Date:   Fri Oct 29 11:08:25 2021 +0300

    Avoid null pointer warning

 src/libtracker-miner/tracker-sparql-buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-sparql-buffer.c b/src/libtracker-miner/tracker-sparql-buffer.c
index b3ff07bd9..40634f2c1 100644
--- a/src/libtracker-miner/tracker-sparql-buffer.c
+++ b/src/libtracker-miner/tracker-sparql-buffer.c
@@ -438,7 +438,7 @@ tracker_sparql_buffer_get_state (TrackerSparqlBuffer *buffer,
        if (!tracker_task_pool_find (TRACKER_TASK_POOL (buffer), file))
                return TRACKER_BUFFER_STATE_UNKNOWN;
 
-       if (g_hash_table_contains (priv->file_set, file))
+       if (priv->file_set != NULL && g_hash_table_contains (priv->file_set, file))
                return TRACKER_BUFFER_STATE_QUEUED;
 
        return TRACKER_BUFFER_STATE_FLUSHING;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]