]> git.saurik.com Git - wxWidgets.git/commitdiff
don't try to create surfaces of 0 size, even if the window size is 0 (as it may happen)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 11 May 2007 17:16:05 +0000 (17:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 11 May 2007 17:16:05 +0000 (17:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/dfb/dcclient.cpp

index c4bd27fc69a13edb07734bd90bb7603cd71c51e6..a10dd02b9e0f046873f017f3f825c9220d86f88d 100644 (file)
@@ -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,