Avoid calling QDesktopServices::openUrl() when cmd is empty.

This commit is contained in:
Felix Geyer 2015-07-13 22:41:03 +02:00
parent 274f86fd04
commit af84261eb6

View File

@ -458,8 +458,10 @@ void DatabaseWidget::openUrlForEntry(Entry* entry)
return;
}
if (urlString.startsWith("cmd://") && (urlString.length() > 6)) {
QProcess::startDetached(urlString.mid(6));
if (urlString.startsWith("cmd://")) {
if (urlString.length() > 6) {
QProcess::startDetached(urlString.mid(6));
}
}
else {
QDesktopServices::openUrl(urlString);