Only release when there is no lock on the object
authorAndy Shaw <andy.shaw@digia.com>
Wed, 14 Aug 2013 08:35:39 +0000 (10:35 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 20 Aug 2013 06:25:43 +0000 (08:25 +0200)
commit871c2fbc5192836cc2918a760aec4d4c680fd8c0
tree06d8e47911a46f00bf21d9daf4c1c84ec20d4a48
parent23717f80cd0f2e6a63aaabc1f62a377d13f76540
Only release when there is no lock on the object

When the widget was unregistered for drag and drop then it would call
Release() on the dropTarget before doing anything else. If the widget
itself did not have a handle then this was not a problem. However in the
case of a widget with a handle then it would call Release() before
the lock on the dropTarget was released which would cause it to crash.

Therefore it is moved so that it is called after the lock is released
to ensure it can be released correctly.

Task-number: QTBUG-13237

Change-Id: Iaec3eb8be3a4ea988218012e973f69cbcdcc45de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
src/gui/kernel/qwidget_win.cpp