[tracker] libtracker-data: Return NULL SQL expression if the binding is not yet setup
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Return NULL SQL expression if the binding is not yet setup
- Date: Sun, 20 Nov 2016 14:57:27 +0000 (UTC)
commit 5bfb7df0ccd77a0c000fd97617aa04638b659963
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Nov 20 15:21:14 2016 +0100
libtracker-data: Return NULL SQL expression if the binding is not yet setup
Recent vala changed property setters so they compare with the previous
value before emitting anything, this triggers the property getter called
at a time when we just don't have a DataTable to construct the SQL
expression (and it's being set anyway).
So ensure the binding is in the right state before trying to construct a
SQL expression for it.
src/libtracker-data/tracker-sparql-query.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index d6a4489..34504c1 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -43,7 +43,7 @@ namespace Tracker.Sparql {
public string sql_db_column_name;
public string sql_expression {
get {
- if (this._sql_expression == null) {
+ if (this._sql_expression == null && table != null) {
this._sql_expression = "\"%s\".\"%s\"".printf
(table.sql_query_tablename, sql_db_column_name);
}
return this._sql_expression;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]