From: Vadim Zeitlin Date: Fri, 11 May 2007 17:16:05 +0000 (+0000) Subject: don't try to create surfaces of 0 size, even if the window size is 0 (as it may happen) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/643de214142254fda8cf0ca95572cff665b6f30d don't try to create surfaces of 0 size, even if the window size is 0 (as it may happen) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/dfb/dcclient.cpp b/src/dfb/dcclient.cpp index c4bd27fc69..a10dd02b9e 100644 --- a/src/dfb/dcclient.cpp +++ b/src/dfb/dcclient.cpp @@ -80,6 +80,11 @@ wxIDirectFBSurfacePtr CreateDummySurface(wxWindow *win, const wxRect *rect) wxLogTrace(TRACE_PAINT, _T("%p ('%s'): creating dummy DC surface"), win, win->GetName().c_str()); wxSize size(rect ? rect->GetSize() : win->GetSize()); + + // we can't create a surface of 0 size but the size of the window may be 0, + // so ensure that we have at least a single pixel to draw on + size.IncTo(wxSize(1, 1)); + return win->GetDfbSurface()->CreateCompatible ( size,