summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-08 09:08:22 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-04-08 08:08:19 -0700
commit3a74f650637e5e8e1ae71933cbfb6373147c0456 (patch)
treed4ab1097ff747b2440f963d750adcc68081c0a47 /core
parentd9599589c71d4288dafdbaa58637956a3447c798 (diff)
downloadsubsurface-3a74f650637e5e8e1ae71933cbfb6373147c0456.tar.gz
fulltext: don't call words.clear() in FullText::populate()
This function was not meant to be called with already existing data. However, if it was, it cleared the words without clearing the fulltext caches of the dives. This lead to crashes. Be more resilient by not clearing the words: Already existing dives are unregistered during the process of populating anyway. So this now *should* work if new dives are added to the dive list and then this function is called. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/fulltext.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/fulltext.cpp b/core/fulltext.cpp
index 084b0019b..56b7b2dcc 100644
--- a/core/fulltext.cpp
+++ b/core/fulltext.cpp
@@ -146,7 +146,6 @@ void FullText::populate()
// we want this to be two calls as the second text is overwritten below by the lines starting with "\r"
uiNotification(QObject::tr("Create full text index"));
uiNotification(QObject::tr("start processing"));
- words.clear();
int i;
dive *d;
for_each_dive(i, d) {