summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-05-05 09:01:02 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-05-05 07:13:46 +0000
commit0cef1cc32f372d19458b000ba4e21b90eca588ba (patch)
tree2c38a4fc946779129c4903a2ff7b6624eaf45daf
parent51cd3b8090c52cab0931e0ab8fab1d83ef914b1e (diff)
downloadqtactiveqt-0cef1cc32f372d19458b000ba4e21b90eca588ba.tar.gz
QAxWidget: Reverse order of releasing the interfaces.
Release IOleControl before IOleObject from which it was obtained. Task-number: QTBUG-45937 Change-Id: I3add7dc6e6c62172b71d36126e2a0ce86b28da5e Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
-rw-r--r--src/activeqt/container/qaxwidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index 9def746..a099bad 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -741,14 +741,15 @@ QAxClientSite::~QAxClientSite()
void QAxClientSite::releaseAll()
{
+ if (m_spOleControl)
+ m_spOleControl->Release();
+ m_spOleControl = Q_NULLPTR;
if (m_spOleObject) {
m_spOleObject->SetClientSite(0);
m_spOleObject->Unadvise(m_dwOleObject);
m_spOleObject->Release();
}
m_spOleObject = 0;
- if (m_spOleControl) m_spOleControl->Release();
- m_spOleControl = 0;
if (m_spInPlaceObject) m_spInPlaceObject->Release();
m_spInPlaceObject = 0;
if (m_spInPlaceActiveObject) m_spInPlaceActiveObject->Release();