From c001235e9146da5c2142e347d89589a69fffeb75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 1 Feb 2023 22:49:03 +0100 Subject: [PATCH] Code cleanup --- src/GUI/settings.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/GUI/settings.cpp b/src/GUI/settings.cpp index efa4211d..9719b016 100644 --- a/src/GUI/settings.cpp +++ b/src/GUI/settings.cpp @@ -6,11 +6,10 @@ static QString defaultPlugin() QString source; QGeoPositionInfoSource *ps = QGeoPositionInfoSource::createDefaultSource(0); - if (!ps) - return source; - - source = ps->sourceName(); - delete ps; + if (ps) { + source = ps->sourceName(); + delete ps; + } return source; }