From 94d2595281d8c992dfad37518d9677827541ed6c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 17 May 2018 15:33:11 +0200 Subject: Caught another case of empty uid in readEntity --- common/datastorequery.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp index 276a10a..f1b0ed2 100644 --- a/common/datastorequery.cpp +++ b/common/datastorequery.cpp @@ -345,8 +345,11 @@ public: //Redo the reduction to find new aggregated values auto selectionResult = reduceOnValue(reductionValue); - //TODO if old and new are the same a modification would be enough auto oldSelectionResult = mSelectedValues.take(reductionValueBa); + //If mSelectedValues did not containthe value, oldSelectionResult will be empty.(Happens if entites have been filtered) + if (oldSelectionResult.isEmpty()) { + return; + } if (oldSelectionResult == selectionResult.selection) { mSelectedValues.insert(reductionValueBa, selectionResult.selection); Q_ASSERT(!selectionResult.selection.isEmpty()); -- cgit v1.2.3