// 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;
if ( !afmName.empty() )
afmFile = wxFopen(afmName, wxT("r"));
- if ( !afmFile )
- {
- }
-
if ( !afmFile )
{
#if defined(__UNIX__) && !defined(__VMS__)