X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..c753eb9269d1e6c99b80a2d782ce49d9864ac1da:/src/common/cmndata.cpp diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 2fd075f47e..0a55186a49 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -524,9 +524,12 @@ void wxPageSetupDialogData::CalculatePaperSizeFromId() wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId()); - // sz is in 10ths of a mm, while paper size is in mm - m_paperSize.x = sz.x / 10; - m_paperSize.y = sz.y / 10; + if (sz != wxSize(0, 0)) + { + // sz is in 10ths of a mm, while paper size is in mm + m_paperSize.x = sz.x / 10; + m_paperSize.y = sz.y / 10; + } } #endif // wxUSE_PRINTING_ARCHITECTURE