From aadded43d71c85a2e5e678c89db2359d020150c8 Mon Sep 17 00:00:00 2001 From: stathis Date: Mon, 22 Sep 2008 01:19:30 +0300 Subject: [PATCH] Check the return value of QFile::open() --- qt/socg/workerthread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt/socg/workerthread.cpp b/qt/socg/workerthread.cpp index c14899d..09555a1 100644 --- a/qt/socg/workerthread.cpp +++ b/qt/socg/workerthread.cpp @@ -75,7 +75,10 @@ void WorkerThread::setFileName(QString fileName) // Open new one m_file.setFileName(fileName); - m_file.open(QIODevice::ReadOnly); + if (!m_file.open(QIODevice::ReadOnly)) { + qDebug("Cannot open file name: %s", fileName); + return; + } in.setDevice(&m_file); extractFileHeader(); } -- 2.11.4.GIT