Check for nullptr before delete

This commit is contained in:
Konstantinos Sideris 2017-05-10 12:45:53 +03:00
parent 61fae5bb0d
commit d277d5c68b

View file

@ -189,11 +189,15 @@ void LoginPage::reset()
matrixid_input_->clear(); matrixid_input_->clear();
password_input_->clear(); password_input_->clear();
settings_modal_->deleteLater(); if (settings_modal_ != nullptr) {
login_settings_->deleteLater(); settings_modal_->deleteLater();
settings_modal_ = nullptr;
}
login_settings_ = nullptr; if (login_settings_ != nullptr) {
settings_modal_ = nullptr; login_settings_->deleteLater();
login_settings_ = nullptr;
}
} }
void LoginPage::onBackButtonClicked() void LoginPage::onBackButtonClicked()