X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6900a89752a9da56f653e388f2248e9e204a9f85..d2e66707deb10dea6f92e3e4092f8a43ef942a5d:/src/generic/logg.cpp diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index e769bfb2bd..1cb929ddb0 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -610,6 +610,11 @@ wxLogWindow::wxLogWindow(wxWindow *pParent, bool bShow, bool bDoPass) { + // Initialize it to NULL to ensure that we don't crash if any log messages + // are generated before the frame is fully created (while this doesn't + // happen normally, it might, in principle). + m_pLogFrame = NULL; + PassMessages(bDoPass); m_pLogFrame = new wxLogFrame(pParent, this, szTitle); @@ -721,7 +726,7 @@ wxLogDialog::wxLogDialog(wxWindow *parent, bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); // create the controls which are always shown and layout them: we use - // sizers even though our window is not resizeable to calculate the size of + // sizers even though our window is not resizable to calculate the size of // the dialog properly wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL); wxBoxSizer *sizerAll = new wxBoxSizer(isPda ? wxVERTICAL : wxHORIZONTAL); @@ -829,7 +834,7 @@ void wxLogDialog::CreateDetailsControls(wxWindow *parent) wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE); // order should be the same as in the switch below! - static const wxChar* const icons[] = + static const char* const icons[] = { wxART_ERROR, wxART_WARNING, @@ -845,7 +850,7 @@ void wxLogDialog::CreateDetailsControls(wxWindow *parent) // This may very well fail if there are insufficient colours available. // Degrade gracefully. - if ( !bmp.Ok() ) + if ( !bmp.IsOk() ) { loadedIcons = false;