From af84261eb61836943ae4b37ba894b239132445ae Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Mon, 13 Jul 2015 22:41:03 +0200 Subject: [PATCH] Avoid calling QDesktopServices::openUrl() when cmd is empty. --- src/gui/DatabaseWidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 0026a4049..0c4167c6b 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -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);