summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-10-18 22:43:45 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-10-18 22:43:45 +0200
commit78fac7dced05c8c020aa84d3e403dd72ecf76027 (patch)
treec1928873f1854bc8e903f8bc39f581c6c2a1c8bc /src
parentRelayout when event delegates change implicit size (diff)
downloadnheko-78fac7dced05c8c020aa84d3e403dd72ecf76027.tar.xz
Small qml fixes
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineFilter.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/timeline/TimelineFilter.cpp b/src/timeline/TimelineFilter.cpp
index 6f2f9e7a..c2d9e31b 100644
--- a/src/timeline/TimelineFilter.cpp
+++ b/src/timeline/TimelineFilter.cpp
@@ -163,14 +163,20 @@ TimelineFilter::setSource(TimelineModel *s)
 
         this->setSourceModel(s);
 
-        connect(s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged);
-        connect(
-          s, &TimelineModel::fetchedMore, this, &TimelineFilter::fetchAgain, Qt::QueuedConnection);
-        connect(s,
-                &TimelineModel::dataChanged,
-                this,
-                &TimelineFilter::sourceDataChanged,
-                Qt::QueuedConnection);
+        if (s) {
+            connect(
+              s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged);
+            connect(s,
+                    &TimelineModel::fetchedMore,
+                    this,
+                    &TimelineFilter::fetchAgain,
+                    Qt::QueuedConnection);
+            connect(s,
+                    &TimelineModel::dataChanged,
+                    this,
+                    &TimelineFilter::sourceDataChanged,
+                    Qt::QueuedConnection);
+        }
 
         // reset the search index a second time just to be safe.
         incrementalSearchIndex = 0;