]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dcbufcmn.cpp
remove duplicate wxTaskBarIconAreaBase::DoPopupMenu, extracting the one-line differen...
[wxWidgets.git] / src / common / dcbufcmn.cpp
index 4d4083603e0ab604ea3e4776ad56e0574e40f19b..8c6c25b40e18d86453f2a827b7f07e171edbe8f5 100644 (file)
@@ -59,6 +59,14 @@ public:
                     h > ms_buffer->GetHeight() )
         {
             delete ms_buffer;
+
+            // we must always return a valid bitmap but creating a bitmap of
+            // size 0 would fail, so create a 1*1 bitmap in this case
+            if ( !w )
+                w = 1;
+            if ( !h )
+                h = 1;
+
             ms_buffer = new wxBitmap(w, h);
         }