diff options
author | Neil <nyamatongwe@gmail.com> | 2014-06-16 11:20:32 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-06-16 11:20:32 +1000 |
commit | 6fe552a1de2102dc1b097011a4b3b96b52842b31 (patch) | |
tree | 410633c474cb0e19f074b8abad5b3d4c47ba45c3 /src | |
parent | 55aab4539ba8b897cb9a30c8303d0dd2a6f72c68 (diff) | |
download | scintilla-mirror-6fe552a1de2102dc1b097011a4b3b96b52842b31.tar.gz |
Fix crashes on Ubuntu 12.04 caused by overlay scrolll bar causing the drawing
surface to be finished.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 63d45158b..18eafa271 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1830,6 +1830,13 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { RefreshStyleData(); RefreshPixMaps(surfWindow); + // On GTK+ with Ubuntu overlay scroll bars, the surface may have been finished + // at this point. The Initialised call checks for this case and sets the status + // to be bad which avoids crashes in following calls. + if (!surfWindow->Initialised()) { + return; + } + PRectangle rcMargin = GetClientRectangle(); Point ptOrigin = GetVisibleOriginInMain(); rcMargin.Move(0, -ptOrigin.y); |