From 398b0609a771490cc46dce7133b0ce766a50d997 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 30 Sep 2017 23:23:07 +0300 Subject: fixes #955 (TabSRMM: crash on template preview renew) --- plugins/TabSRMM/src/ImageDataObject.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') 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 lpDataObject; -- cgit v1.2.3