summaryrefslogtreecommitdiff
path: root/vcl/win/dtrans/target.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/win/dtrans/target.cxx')
-rw-r--r--vcl/win/dtrans/target.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/vcl/win/dtrans/target.cxx b/vcl/win/dtrans/target.cxx
index adddabab7038..45a8515bd414 100644
--- a/vcl/win/dtrans/target.cxx
+++ b/vcl/win/dtrans/target.cxx
@@ -30,6 +30,8 @@
#include "targetdragcontext.hxx"
#include <rtl/ustring.h>
#include <osl/thread.h>
+#include <sal/log.hxx>
+#include <comphelper/windowserrorstring.hxx>
#include "DOTransferable.hxx"
@@ -206,8 +208,14 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
DWORD threadId= GetCurrentThreadId();
// We force the creation of a thread message queue. This is necessary
// for a later call to AttachThreadInput
- while( GetMessageW(&msg, nullptr, 0, 0) )
+ BOOL bRet;
+ while ((bRet = GetMessageW(&msg, nullptr, 0, 0)) != 0)
{
+ if (-1 == bRet)
+ {
+ SAL_WARN("vcl.win.dtrans", "GetMessageW failed: " << WindowsErrorString(GetLastError()));
+ break;
+ }
if( msg.message == WM_REGISTERDRAGDROP)
{
DropTarget *pTarget= reinterpret_cast<DropTarget*>(msg.wParam);