From 0726bab82b290a92e30a1c4dd0d85df42ef6c4c6 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 11 Jun 2020 08:52:57 +1000 Subject: Avoid warning for potential nullptr dereference that is not actually possible. --- win32/ScintillaWin.cxx | 6 ++++-- 1 file 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); -- cgit v1.2.3