Skip to content

Commit

Permalink
Fix segfault on i3 when changing workspaces. Fixes lxqt/lxqt#240
Browse files Browse the repository at this point in the history
i3 workspaces are inconsistent with the desktop switch widget.
  • Loading branch information
paulolieuthier committed Oct 30, 2014
1 parent 73fcf2d commit ab9fb64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin-desktopswitch/desktopswitch.cpp
Expand Up @@ -117,7 +117,10 @@ void DesktopSwitch::onNumberOfDesktopsChanged(int count)

void DesktopSwitch::onCurrentDesktopChanged(int current)
{
m_buttons->button(current - 1)->setChecked(true);
qDebug() << "LOL " << current;
QAbstractButton *button = m_buttons->button(current - 1);
if (button)
button->setChecked(true);
}

void DesktopSwitch::onDesktopNamesChanged()
Expand Down

0 comments on commit ab9fb64

Please sign in to comment.