From 85508a90a8e2c9e9a2a7fa8f646925962f60d367 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 5 Jan 2015 16:09:09 +1100 Subject: Check for non-NULL render target and avoid Coverity warning. --- win32/ScintillaWin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 5198b0f21..ec72a405a 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -522,7 +522,7 @@ void ScintillaWin::EnsureRenderTarget(HDC hdc) { DropGraphics(false); } - if (technology == SC_TECHNOLOGY_DIRECTWRITEDC) { + if ((technology == SC_TECHNOLOGY_DIRECTWRITEDC) && pRenderTarget) { RECT rcWindow; GetClientRect(MainHWND(), &rcWindow); HRESULT hr = static_cast(pRenderTarget)->BindDC(hdc, &rcWindow); -- cgit v1.2.3