diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-11-04 13:30:41 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-11-04 13:38:34 +0100 |
commit | a9689de926d332309c28a59dc7f591ad891b835d (patch) | |
tree | 01307d5df9f0ae0876693206b7103822cbecb3fa | |
parent | 25d795aa6a230fa5faa3fce9835fa181bddabe12 (diff) | |
download | tracker-wip/carlosg/uri-is-parent-checks.tar.gz |
libtracker-data: Do not error on NULL arguments in tracker:uri-is-parentwip/carlosg/uri-is-parent-checks
This may happen during query evaluation, without the query explicitly
specifying any NULL value. If we error out, query execution will
definitely stop, and the error may propagate further up.
Just tiptoe over those values, and let query evaluation continue
further, the right results will be eventually returned.
Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/235
-rw-r--r-- | src/libtracker-data/tracker-db-interface-sqlite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c index c6a20a84c..18a174e26 100644 --- a/src/libtracker-data/tracker-db-interface-sqlite.c +++ b/src/libtracker-data/tracker-db-interface-sqlite.c @@ -288,7 +288,7 @@ function_sparql_uri_is_parent (sqlite3_context *context, uri = (gchar *)sqlite3_value_text (argv[1]); if (!parent || !uri) { - result_context_function_error (context, fn, "Invalid arguments"); + sqlite3_result_int (context, FALSE); return; } |