From edee237fb88861def38df69cd0de14d42a734379 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 14 Aug 2021 15:24:22 +0300 Subject: [PATCH] Fix crash when we open the same file at the same windows twice. --- src/app/puzzle/vpmainwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp index 3878952a8..415b45abe 100644 --- a/src/app/puzzle/vpmainwindow.cpp +++ b/src/app/puzzle/vpmainwindow.cpp @@ -149,8 +149,12 @@ auto VPMainWindow::LoadFile(QString path) -> bool if (w != list.end()) { (*w)->activateWindow(); - close(); - return false; + if (this != *w) + { + close(); + return false; + } + return true; } VlpCreateLock(lock, path);