Commit b7a76cd7 authored by Daniel Teske's avatar Daniel Teske
Browse files

Fix overriding the default session

To reproduce the bug:
1) Load a project into the default session.cpp
2) Close creator (which saves the session)
3) Start Creator
4) Create a new session and switch to it => This calls createImpl
   and overrides the default session, even though it shouldn't
5) Load the default session, which will now be empty

Change-Id: I7c23fba8c1f9fd32cc95b3b9206afc422c1f0133
Reviewed-by: default avatarTobias Hunger <>
parent 8517c143
......@@ -545,7 +545,9 @@ bool SessionManager::createImpl(const QString &fileName)
bool success = true;
if (!m_file->fileName().isEmpty()) {
if (!save() || !clear())
if (isDefaultVirgin()) {
// do not save initial and virgin default session
} else if (!save() || !clear())
success = false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment