From 39f8e9da822161a1952d092bbc7c7f18214aeb53 Mon Sep 17 00:00:00 2001 From: cutefishd Date: Mon, 10 May 2021 10:26:23 +0800 Subject: [PATCH] Fix desktop crash --- model/positioner.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/positioner.cpp b/model/positioner.cpp index 490369d..441bcd9 100644 --- a/model/positioner.cpp +++ b/model/positioner.cpp @@ -348,6 +348,9 @@ int Positioner::columnCount(const QModelIndex &parent) const void Positioner::reset() { + if (m_positions.isEmpty()) + return; + beginResetModel(); initMaps();