Skip to content

Commit

Permalink
Do not crash when zipped project is not a valid zip
Browse files Browse the repository at this point in the history
Fixes #20783 - Crash when opening qgz project
  • Loading branch information
elpaso committed Dec 13, 2018
1 parent 14e59ee commit 1bc9234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsziputils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ bool QgsZipUtils::unzip( const QString &zipFilename, const QString &dir, QString
}
else
{
QString err = QObject::tr( "Error opening zip archive: '%1'" ).arg( zip_strerror( z ) );
QString err = QObject::tr( "Error opening zip archive: '%1'" ).arg( z ? zip_strerror( z ) : zipFilename );
QgsMessageLog::logMessage( err, QStringLiteral( "QgsZipUtils" ) );
return false;
}
Expand Down

0 comments on commit 1bc9234

Please sign in to comment.