m_maximum = maximum;
m_elapsed = m_estimated = m_remaining = NULL;
- if ((style & (wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME)) != 0) m_time = new wxTime;
- else m_time = NULL;
+ if ((style & (wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME |
+ wxPD_REMAINING_TIME)) != 0)
+ m_time = new wxTime;
+ else
+ m_time = NULL;
wxFrame::Create(m_parent, -1, title, wxDefaultPosition,
wxDefaultSize, wxDEFAULT_DIALOG_STYLE);
Centre(wxCENTER_FRAME | wxBOTH);
if(m_disableParentOnly)
- m_parent->Enable(FALSE);
+ {
+ if(m_parent) m_parent->Enable(FALSE);
+ }
else
wxEnableTopLevelWindows(FALSE);
wxProgressDialog::~wxProgressDialog()
{
if ( m_disableParentOnly )
- m_parent->Enable(TRUE);
+ {
+ if(m_parent) m_parent->Enable(TRUE);
+ }
else
wxEnableTopLevelWindows(TRUE);
if (m_time) delete m_time;