Fixed a bug in CEngLog that crashed the app.

Correction d'un pointeur non assigné qui crashait l'application lorsque
le log d'ingénierie était désactivé dans ZT.cfg.
This commit is contained in:
jfmartel 2017-10-02 14:33:12 -04:00
parent 749b66566c
commit 36e387b152
2 changed files with 13 additions and 1 deletions

View File

@ -123,12 +123,18 @@ void CEngLog::AddLogString(QString string, unsigned int Verbosity)
//When a buffer is already formatted, just write it to the file.
void CEngLog::WriteFormattedString(QString string)
{
if(mEngLogFile == NULL)
return;
mEngLogFile->write(string.toUtf8());
qDebug("%s",string.toUtf8().data());
}
unsigned int CEngLog::DeleteEngLogFile()
{
if(mEngLogFile == NULL)
return RET_ERROR;
mEngLogFile->remove();
delete mEngLogFile;

View File

@ -28,9 +28,15 @@
#ifndef ZTVERSION_H
#define ZTVERSION_H
#define ZT_SOFT_VERSION "ZT_MODBUS_DEV"
#define ZT_SOFT_VERSION "V1.16"
//LOG DES CHANGEMENTS
//Version 1.16
//-Implantation de la communicationp Modbus avec la Commande Centralisée. Ceci implique
// plusieurs changements.
//-Correction d'un bug qui faisait planter le logiciel lors de la désactivation du log
// d'ingénierie.
//Version 1.15
//Modification de l'initialisation de la station à partir de la clef électrique directement.
//Retrait de la vérification de la cohérence de la clef avec le fichier de configuration.