summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-17 13:18:28 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-25 11:41:13 +0000
commit4c3fa449acfc7ec43f3b2c53318c2838ceba5a86 (patch)
tree7a4e8b6f0a9da49f1be7f3a1c4da43d37a075dbf /src
parentb14550fa45395d6b57d958bb4a4e42212ba0da0f (diff)
Fix potential crash in QWindowsWindow::setDropSiteEnabled().
Release drop target after CoLockObjectExternal() to prevent a potential access violation. Change-Id: I2c3bde9f8008b1d567544596f56ebfd61fe6ad86 Task-number: QTBUG-47737 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 853cf036a7..288f73cb8f 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1034,8 +1034,8 @@ void QWindowsWindow::setDropSiteEnabled(bool dropEnabled)
RegisterDragDrop(m_data.hwnd, m_dropTarget);
CoLockObjectExternal(m_dropTarget, true, true);
} else {
- m_dropTarget->Release();
CoLockObjectExternal(m_dropTarget, false, true);
+ m_dropTarget->Release();
RevokeDragDrop(m_data.hwnd);
m_dropTarget = 0;
}