[kmymoney] [Bug 462827] Crash when editing splits in a transaction

Ralf Habacker bugzilla_noreply at kde.org
Tue Aug 6 14:49:29 BST 2024


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

Ralf Habacker <ralf.habacker at freenet.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |CONFIRMED
                 CC|                            |ralf.habacker at freenet.de
     Ever confirmed|0                           |1

--- Comment #8 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to Ian Neal from comment #0)

> [KCrash Handler]
> #4  0x00007f1fdb5eb750 in QWidget::setFocus(Qt::FocusReason) () at
> /lib64/libQt5Widgets.so.5
> #5  0x000055671ba799e9 in KMyMoneySplitTable::endEdit(bool, bool) ()
> #6  0x00007f1fd7ad2ec4 in QObject::event(QEvent*) () at
> /lib64/libQt5Core.so.5

It looks, that if the edit split is not valid in KMyMoneySplitTable::endEdit(),
 d->m_editCategory is accessed, which may be unset or zero. 

    if (!isEditSplitValid()) {
        KMessageBox::information(this, i18n("You need to assign a category to
this split before it can be entered."), i18n("Enter split"),
"EnterSplitWithEmptyCategory");
        d->m_editCategory->setFocus();
        return;

Changing to 
if (d->m_editCategory) 
    d->m_editCategory->setFocus();

should solve the crash.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list