Commit 849dbe07 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

VlmcLogger: Fix crash when running without logfile

parent aca53019
......@@ -185,7 +185,8 @@ VlmcLogger::backendLogHandler(void *data, Backend::IBackend::LogLevel logLevel,
char* newMsg = NULL;
asprintf( &newMsg, "[%s] T #%p [Backend] %s", qPrintable( QTime::currentTime().toString( "hh:mm:ss.zzz" ) ),
QThread::currentThreadId(), msg );
self->writeToFile( newMsg );
if ( self->m_logFile != NULL )
self->writeToFile( newMsg );
if ( logLevel < self->m_backendLogLevel )
{
free( newMsg );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment