Skip to content

Commit

Permalink
ui/simpledesk: fix disconnect with NULL argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Aug 9, 2018
1 parent 3047163 commit 03ef9b2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ui/src/simpledesk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,11 @@ void SimpleDesk::slotViewModeClicked(bool toggle)
if (fxRemoveList.contains(slider->fixture()) == false)
{
Fixture *currFx = m_doc->fixture(slider->fixture());
disconnect(currFx, SIGNAL(aliasChanged()), this, SLOT(slotAliasChanged()));
fxRemoveList.append(slider->fixture());
if (currFx != NULL)
{
disconnect(currFx, SIGNAL(aliasChanged()), this, SLOT(slotAliasChanged()));
fxRemoveList.append(slider->fixture());
}
}
delete slider;
m_universeSliders[i] = NULL;
Expand Down Expand Up @@ -657,8 +660,11 @@ void SimpleDesk::slotUniversePageChanged(int page)
if (fxRemoveList.contains(slider->fixture()) == false)
{
Fixture *currFx = m_doc->fixture(slider->fixture());
disconnect(currFx, SIGNAL(aliasChanged()), this, SLOT(slotAliasChanged()));
fxRemoveList.append(slider->fixture());
if (currFx != NULL)
{
disconnect(currFx, SIGNAL(aliasChanged()), this, SLOT(slotAliasChanged()));
fxRemoveList.append(slider->fixture());
}
}
delete slider;
m_universeSliders[i] = NULL;
Expand Down

0 comments on commit 03ef9b2

Please sign in to comment.