[tracker/tracker-1.10] 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/tracker-1.10] libtracker-data: Return NULL SQL expression if the binding is not yet setup
- Date: Thu, 8 Dec 2016 18:06:28 +0000 (UTC)
commit 8d9a386d26a0b1c35dbd4025f17c91bc0b78a6ba
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]