From 3db61912841d25f2220a12382a6183018662c2a3 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sat, 2 May 2015 18:26:06 +0200 Subject: [PATCH] Re #2090: segmentation fault fixed when play button was pressed for the first time --- companion/src/modeledit/customfunctions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index a006a3623..8171034fd 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -264,7 +264,9 @@ void CustomFunctionsPanel::playMusic() phononCurrent = -1; } else { - playBT[phononCurrent]->setIcon(CompanionIcon("play.png")); + if (phononCurrent >= 0) { + playBT[phononCurrent]->setIcon(CompanionIcon("play.png")); + } phononCurrent = index; clickObject->clear(); #ifdef __APPLE__