aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp3
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelineview.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp
index a8b20f8380..7272735be2 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelineview.cpp
@@ -89,7 +89,8 @@ void TimelineView::modelAttached(Model *model)
void TimelineView::modelAboutToBeDetached(Model *model)
{
- m_timelineWidget->reset();
+ if (!m_timelineWidget)
+ m_timelineWidget->reset();
const bool empty = getTimelines().isEmpty();
if (!empty)
setTimelineRecording(false);
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineview.h b/src/plugins/qmldesigner/components/timelineeditor/timelineview.h
index f1f39b6a35..13efe40ba3 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelineview.h
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelineview.h
@@ -100,7 +100,7 @@ public:
private:
TimelineWidget *createWidget();
- TimelineWidget *m_timelineWidget = nullptr;
+ QPointer<TimelineWidget> m_timelineWidget;
bool hasQtQuickTimelineImport();
void ensureQtQuickTimelineImport();
};