Skip to content

Commit 9ca85f7

Browse files
committedDec 12, 2018
Do not crash when zipped project is not a valid zip
Fixes #20783 - Crash when opening qgz project
1 parent 6de0160 commit 9ca85f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/qgsziputils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ bool QgsZipUtils::unzip( const QString &zipFilename, const QString &dir, QString
110110
}
111111
else
112112
{
113-
QString err = QObject::tr( "Error opening zip archive: '%1'" ).arg( zip_strerror( z ) );
113+
QString err = QObject::tr( "Error opening zip archive: '%1'" ).arg( z ? zip_strerror( z ) : zipFilename );
114114
QgsMessageLog::logMessage( err, QStringLiteral( "QgsZipUtils" ) );
115115
return false;
116116
}

0 commit comments

Comments
 (0)
Please sign in to comment.