X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cdccdfabb29bd51aded9aac141e1f7bbd6c85443..0c6fcb099ead764be7c9eb5ef8c3e9ab785a36c4:/src/msw/dcclient.cpp diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 05685aa39f..75c1c9a550 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -238,10 +238,16 @@ wxPaintDC::wxPaintDC(wxWindow *canvas) ms_cache.Add(new wxPaintDCInfo(m_canvas, this)); } - // (re)set the DC parameters. // Note: at this point m_hDC can be NULL under MicroWindows, when dragging. - if (GetHDC()) - InitDC(); + if (!GetHDC()) + return; + + // (re)set the DC parameters. + InitDC(); + + // the HDC can have a clipping box (which we didn't set), make sure our + // DoGetClippingBox() checks for it + m_clipping = true; } wxPaintDC::~wxPaintDC()