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 | 46a02c988454c5c29943475a7b44bc0bdafefb55 (patch) | |
| tree | 7416edfbdab2dab25b5931d64307b2fa78a65987 | |
| parent | b50d82d5dd2c07da8064c4accbedb523a51b500d (diff) | |
| download | scintilla-mirror-46a02c988454c5c29943475a7b44bc0bdafefb55.tar.gz | |
Backport: Avoid warning for potential nullptr dereference that is not actually possible.
Backport of changeset 8298:95489a5b6e62.
| -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 651a2629f..668a450a8 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -3517,8 +3517,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); |
