Commit bfa52d01 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Fix crash on first course install

If user installs first language course on a clean system, correctly
setup learning environment.
parent ddeef917
......@@ -57,8 +57,6 @@ void TrainingSession::setLanguage(Language *language)
if (m_language == language) {
return;
}
setCourse(nullptr);
setUnit(nullptr);
m_language = language;
emit languageChanged();
}
......@@ -70,6 +68,9 @@ Course * TrainingSession::course() const
void TrainingSession::setCourse(Course *course)
{
if (!course) {
return;
}
if (m_course == course) {
return;
}
......
Markdown is supported
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