Fix possible crash

Observed with an MFC application
This commit is contained in:
Sergio Martins
2021-06-18 16:01:49 +01:00
parent 4c1b433269
commit b68f81779c
2 changed files with 2 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
- Introduced Config::setDropIndicatorsInhibited(), which allows you to disable support
for drop indicators while dragging.
- Fixed embedding the main window into a non-kddw main window (#204, #168)
- Fixed crash with an MFC application
* v1.3.2 (unreleased)
-

View File

@@ -202,7 +202,7 @@ bool DockRegistry::isProbablyObscured(QWindow *window, FloatingWindow *exclude)
for (MainWindowBase *mw : m_mainWindows) {
QWindow *mwWindow = mw->window()->windowHandle();
if (mwWindow != window && !targetIsToolWindow && mwWindow->geometry().intersects(geo)) {
if (mwWindow && mwWindow != window && !targetIsToolWindow && mwWindow->geometry().intersects(geo)) {
// Two main windows that intersect. Return true. If the target is a tool window it will be above, so we don't care.
return true;
}