summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/ImageDataObject.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-30 23:23:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-30 23:23:07 +0300
commit398b0609a771490cc46dce7133b0ce766a50d997 (patch)
tree24cbf9fda8fce751d0d251aa8498a493d7bb1e49 /plugins/TabSRMM/src/ImageDataObject.cpp
parent44d59fe4a8c53bbced7f9eb2d60a44ec9ca080c8 (diff)
fixes #955 (TabSRMM: crash on template preview renew)
Diffstat (limited to 'plugins/TabSRMM/src/ImageDataObject.cpp')
-rw-r--r--plugins/TabSRMM/src/ImageDataObject.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/TabSRMM/src/ImageDataObject.cpp b/plugins/TabSRMM/src/ImageDataObject.cpp
index 22346707f9..ba771838ca 100644
--- a/plugins/TabSRMM/src/ImageDataObject.cpp
+++ b/plugins/TabSRMM/src/ImageDataObject.cpp
@@ -32,8 +32,11 @@
#include "stdafx.h"
// returns true on success, false on failure
-bool CImageDataObject::InsertBitmap(IRichEditOle* pRichEditOle, HBITMAP hBitmap)
+bool CImageDataObject::InsertBitmap(IRichEditOle *pRichEditOle, HBITMAP hBitmap)
{
+ if (pRichEditOle == nullptr)
+ return false;
+
// Get the image data object
CImageDataObject *pods = new CImageDataObject;
CComPtr<IDataObject> lpDataObject;