Mercurial > trustbridge
diff ui/administratorwindow.cpp @ 567:75e39c52aa94
Check if cert-list filename is null (user canceled open file dialog).
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 23 May 2014 10:24:51 +0200 |
parents | 8728ae882b6a |
children | c9d296f04995 |
line wrap: on
line diff
--- a/ui/administratorwindow.cpp Thu May 22 18:29:14 2014 +0200 +++ b/ui/administratorwindow.cpp Fri May 23 10:24:51 2014 +0200 @@ -142,6 +142,9 @@ QString lastCertFile = mSettings.value("LastCertList", QDir::homePath()).toString(); QString certFile = QFileDialog::getOpenFileName( this, tr("Select certificate list file"), lastCertFile, "*.txt"); + if (certFile.isNull()) { + return; + } mCertList.readList(certFile.toLocal8Bit().constData()); if (!mCertList.isValid()) { QMessageBox::warning(this, tr("Error!"), tr("Failed to load the certificate list."));