X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..000c2be40d8e0231f6565ba2931f4c88add433d9:/src/common/dcbufcmn.cpp?ds=sidebyside diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp index 1d339f8ba0..2e3d792400 100644 --- a/src/common/dcbufcmn.cpp +++ b/src/common/dcbufcmn.cpp @@ -118,7 +118,7 @@ void wxBufferedDC::UseBuffer(wxCoord w, wxCoord h) // now that the DC is valid we can inherit the attributes (fonts, colours, // layout direction, ...) from the original DC - if ( m_dc->IsOk() ) + if ( m_dc && m_dc->IsOk() ) CopyAttributes(*m_dc); } @@ -130,6 +130,9 @@ void wxBufferedDC::UnMask() wxCoord x = 0, y = 0; + // Ensure the scale matches the device + SetUserScale(1.0, 1.0); + if ( m_style & wxBUFFER_CLIENT_AREA ) GetDeviceOrigin(&x, &y);