diff --git a/src/common/log.cpp b/src/common/log.cpp index ff0532eb05..525f8cfd19 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -227,7 +227,8 @@ wxLog *wxLog::GetActiveTarget() ms_pLogger = new wxLogStderr; #else // ask the application to create a log target for us - ms_pLogger = wxTheApp->CreateLogTarget(); + if ( wxTheApp != NULL ) + ms_pLogger = wxTheApp->CreateLogTarget(); #endif // do nothing if it fails - what can we do?