X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9968ba85be146ad4f282cfdc6ce72b68897fbb10..2beb01db001c9c22e4865fba3ba9b46ff5fc2dda:/contrib/src/stc/PlatWX.cpp diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 29535072a7..ae53b19b54 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -174,6 +174,8 @@ void Surface::InitPixMap(int width, int height, Surface *surface_) { Release(); hdc = new wxMemoryDC(surface_->hdc); hdcOwned = true; + if (width < 1) width = 1; + if (height < 1) height = 1; bitmap = new wxBitmap(width, height); ((wxMemoryDC*)hdc)->SelectObject(*bitmap); }