https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0452d3415aa65ae1c2f29…
commit 0452d3415aa65ae1c2f291ec5b22c12d01fecd19
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sat Oct 15 12:32:43 2022 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Wed Oct 19 19:38:33 2022 +0200
[SHELL32] Fix 'Paste' command in context menu not working
Bug found by Rosen Iliev
---
dll/win32/shell32/CDefaultContextMenu.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dll/win32/shell32/CDefaultContextMenu.cpp
b/dll/win32/shell32/CDefaultContextMenu.cpp
index 15acfae51a3..ecb456661ae 100644
--- a/dll/win32/shell32/CDefaultContextMenu.cpp
+++ b/dll/win32/shell32/CDefaultContextMenu.cpp
@@ -1222,7 +1222,7 @@ CDefaultContextMenu::InvokeCommand(
if (LocalInvokeInfo.cbSize >= sizeof(CMINVOKECOMMANDINFOEX) &&
(LocalInvokeInfo.fMask & CMIC_MASK_PTINVOKE))
{
- if (FAILED_UNEXPECTEDLY(DataObject_SetOffset(m_pDataObj,
&LocalInvokeInfo.ptInvoke)))
+ if (m_pDataObj && FAILED_UNEXPECTEDLY(DataObject_SetOffset(m_pDataObj,
&LocalInvokeInfo.ptInvoke)))
{
ERR("Unable to add OFFSET to DataObject!\n");
}