https://bugs.kde.org/show_bug.cgi?id=419526

Fabian Vogt <fab...@ritter-vogt.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fab...@ritter-vogt.de

--- Comment #7 from Fabian Vogt <fab...@ritter-vogt.de> ---
The issue seems to be:

connect(_codecAction->menu(), &QMenu::aboutToShow, this,
&Konsole::SessionController::updateCodecAction);

void SessionController::updateCodecAction()
{
    _codecAction->setCurrentCodec(QString::fromUtf8(_session->codec()));
}

bool KCodecAction::setCurrentCodec(QTextCodec *codec)
{
  ...
                if (codec ==
KCharsets::charsets()->codecForName(actions().at(i)->menu()->actions().at(j)->text()))
{
                    d->currentSubAction =
actions().at(i)->menu()->actions().at(j);
                    d->currentSubAction->trigger();
                    return true;
                }
  ...
}

So the aboutToShow signal hides the menu directly, leading to a null deref
later on.

It should probably use ->setChecked(true); instead.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to