aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/browser.cpp2
-rw-r--r--src/profilemanager.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index f6b3805..38c7d85 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -155,6 +155,8 @@ void Browser::createSession(const QJsonObject &object)
const QJsonObject subwindow = s.toObject();
const QString profileId = subwindow.value("profile").toString();
WebProfile *profile = ProfileManager::profile(profileId);
+ if(profile == nullptr)
+ profile = WebProfile::defaultProfile();
Q_CHECK_PTR(profile);
SubWindow *window = nullptr;
diff --git a/src/profilemanager.cpp b/src/profilemanager.cpp
index bb967b9..1038598 100644
--- a/src/profilemanager.cpp
+++ b/src/profilemanager.cpp
@@ -80,7 +80,7 @@ WebProfile *ProfileManager::profile(const QString &id)
if(profiles.contains(id))
return profiles.value(id);
else
- return WebProfile::defaultProfile();
+ return nullptr;
}
const QMap<QString, WebProfile *> &ProfileManager::profileList()