summaryrefslogtreecommitdiffstats
path: root/PC/pyshellext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'PC/pyshellext.cpp')
-rw-r--r--PC/pyshellext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/PC/pyshellext.cpp b/PC/pyshellext.cpp
index 04fe61e..0198802 100644
--- a/PC/pyshellext.cpp
+++ b/PC/pyshellext.cpp
@@ -172,6 +172,11 @@ private:
return E_FAIL;
}
auto dd = (DROPDESCRIPTION*)GlobalLock(medium.hGlobal);
+ if (!dd) {
+ OutputDebugString(L"PyShellExt::UpdateDropDescription - failed to lock DROPDESCRIPTION hGlobal");
+ ReleaseStgMedium(&medium);
+ return E_FAIL;
+ }
StringCchCopy(dd->szMessage, sizeof(dd->szMessage) / sizeof(dd->szMessage[0]), DRAG_MESSAGE);
StringCchCopy(dd->szInsert, sizeof(dd->szInsert) / sizeof(dd->szInsert[0]), PathFindFileNameW(target));
dd->type = DROPIMAGE_MOVE;