Don't create a bitmap with dimensions <= 0...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1650623133
commit
2beb01db00
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user