Commit d2321ae5 authored by Thiago C. Santini's avatar Thiago C. Santini

Adds missing check for valid parallel port log pointer

parent fc009978
......@@ -39,6 +39,9 @@ void ParallelPort::openLog()
{
QMutexLocker locker(&mutex);
if (!log)
return;
log->open(getNamePrefix().append(QString("parallelPort-%1.txt").arg(gFileIndexStr)).toStdString(), std::fstream::app);
}
......@@ -46,6 +49,9 @@ void ParallelPort::closeLog()
{
QMutexLocker locker(&mutex);
if (!log)
return;
if (log->is_open())
log->close();
}
......@@ -54,6 +60,9 @@ void ParallelPort::poll()
{
QMutexLocker locker(&mutex);
if (!log)
return;
if (!fpIsInpOutDriverOpen)
return;
......
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