aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-01-05 16:09:09 +1100
committerNeil <nyamatongwe@gmail.com>2015-01-05 16:09:09 +1100
commit85508a90a8e2c9e9a2a7fa8f646925962f60d367 (patch)
tree28a7101fea03f487084f3e42af65671df52ec1ad
parent1df3a419c6dfbdf5241f76365f5485586122181a (diff)
downloadscintilla-mirror-85508a90a8e2c9e9a2a7fa8f646925962f60d367.tar.gz
Check for non-NULL render target and avoid Coverity warning.
-rw-r--r--win32/ScintillaWin.cxx2
1 files changed, 1 insertions, 1 deletions
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<ID2D1DCRenderTarget*>(pRenderTarget)->BindDC(hdc, &rcWindow);