Merge pull request #5004 from ivan-leontiev/fix-nullptr-deref

Add condition against nullptr dereferencing to AnalyzerContainer::TogglePsychedelicColors()
This commit is contained in:
John Maguire 2015-08-18 21:52:13 +01:00
commit 509b4ccdba
1 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,9 @@ void AnalyzerContainer::DisableAnalyzer() {
void AnalyzerContainer::TogglePsychedelicColors() {
psychedelic_colors_on_ = !psychedelic_colors_on_;
current_analyzer_->psychedelicModeChanged(psychedelic_colors_on_);
if (current_analyzer_) {
current_analyzer_->psychedelicModeChanged(psychedelic_colors_on_);
}
SavePsychedelic();
}