Handle opening of invalid FrIDa file
authorChristoph Egger <Christoph.Egger@fau.de>
Wed, 25 Mar 2015 13:05:12 +0000 (14:05 +0100)
committerChristoph Egger <Christoph.Egger@fau.de>
Wed, 25 Mar 2015 13:05:12 +0000 (14:05 +0100)
src/core/InformationManager.cxx

index 485aacd9868a954b350d5c43a958de71a72c8b75..b9649829c48a3554367358e16ad5d21a047b6e5e 100644 (file)
@@ -50,7 +50,10 @@ void InformationManager::load(const std::string& filename) {
        QuaZipFile file(&zip);
        QuaZipFileInfo info;
 
-       zip.open(QuaZip::mdUnzip);
+       if (!zip.open(QuaZip::mdUnzip)) {
+               LOG4CXX_ERROR(logger, "Failed to open archive " << filename);
+               return;
+       }
        tmpfile.reset(new QTemporaryFile());
 
        {