diff options
author | Neil <nyamatongwe@gmail.com> | 2020-06-11 08:52:57 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-06-11 08:52:57 +1000 |
commit | 0726bab82b290a92e30a1c4dd0d85df42ef6c4c6 (patch) | |
tree | 369bc468fb58016e79cd8baa41c11c497374ed93 | |
parent | 0b9c12bf9cc211c30a40b13d7ba72dbba5328369 (diff) | |
download | scintilla-mirror-0726bab82b290a92e30a1c4dd0d85df42ef6c4c6.tar.gz |
Avoid warning for potential nullptr dereference that is not actually possible.
-rw-r--r-- | win32/ScintillaWin.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 38fa351c0..5d0020d30 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -3452,8 +3452,10 @@ LRESULT PASCAL ScintillaWin::CTWndProc( } // If above SUCCEEDED, then pCTRenderTarget not nullptr assert(pCTRenderTarget); - surfaceWindow->Init(pCTRenderTarget, hWnd); - pCTRenderTarget->BeginDraw(); + if (pCTRenderTarget) { + surfaceWindow->Init(pCTRenderTarget, hWnd); + pCTRenderTarget->BeginDraw(); + } #endif } surfaceWindow->SetUnicodeMode(SC_CP_UTF8 == sciThis->ct.codePage); |