diff --git a/src/util.h b/src/util.h index e430f4e1..02ef817d 100755 --- a/src/util.h +++ b/src/util.h @@ -484,13 +484,20 @@ public: { // open file pFile = fopen ( LOG_FILE_NAME, "a" ); + + if ( pFile != NULL ) + { + bDoLogging = true; + } } - CLogging& operator<< ( const QString & sNewStr ) + void operator<< ( const QString & sNewStr ) { - fprintf ( pFile, "%s\n", sNewStr.latin1() ); - fflush ( pFile ); - return *this; + if ( bDoLogging ) + { + fprintf ( pFile, "%s\n", sNewStr.latin1() ); + fflush ( pFile ); + } } protected: