diff options
-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); |