Fixed problem trying to print from a preview, whereby wrong printer

class was used instead of Gnome printer class.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-12-19 20:38:47 +00:00
parent 0b6d76bfd4
commit 398c701f70
3 changed files with 18 additions and 7 deletions

View File

@@ -1973,9 +1973,9 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
// it just crashes
#ifndef __WIN32__
wxPostScriptPrintNativeData *data =
(wxPostScriptPrintNativeData *) m_printData.GetNativeData();
wxDynamicCast(m_printData.GetNativeData(), wxPostScriptPrintNativeData);
if (!data->GetFontMetricPath().empty())
if (data && !data->GetFontMetricPath().empty())
{
afmName = data->GetFontMetricPath();
afmName << wxFILE_SEP_PATH << name;