Fix crash when we open the same file at the same windows twice.

This commit is contained in:
Roman Telezhynskyi 2021-08-14 15:24:22 +03:00
parent 807183b2ce
commit edee237fb8

View File

@ -149,8 +149,12 @@ auto VPMainWindow::LoadFile(QString path) -> bool
if (w != list.end()) if (w != list.end())
{ {
(*w)->activateWindow(); (*w)->activateWindow();
close(); if (this != *w)
return false; {
close();
return false;
}
return true;
} }
VlpCreateLock(lock, path); VlpCreateLock(lock, path);