Fix constant crashes related to the vi command bar
ClosedPublic

Authored by leandrosantiago on Sep 2 2016, 10:24 PM.

Details

Reviewers
michalhumpula
Group Reviewers
KTextEditor
Summary

KDevelop, when using vi input mode, crashes a lot on trying to dereference a null pointer.

Awkwardly this change break the unit test vimode_completion, but I confess I think it should cause no harm.

Diff Detail

Repository
R39 KTextEditor
Lint
Lint Skipped
Unit
Unit Tests Skipped
leandrosantiago retitled this revision from to Fix constant crashes related to the vi command bar.
leandrosantiago updated this object.
leandrosantiago edited the test plan for this revision. (Show Details)
leandrosantiago added a reviewer: KTextEditor.
leandrosantiago set the repository for this revision to R39 KTextEditor.
Restricted Application added a subscriber: kwrite-devel. ยท View Herald TranscriptSep 2 2016, 10:24 PM

Hi Leandro, thanks for the patch. The check for the nullptr should be perfectly ok. It's weird that it breaks the tests. One little nitpick: please try to comply with the code style of kf5 libraries https://techbase.kde.org/Policies/Frameworks_Coding_Style#Braceslibraries.

This comment was removed by michalhumpula.
michalhumpula accepted this revision.Sep 3 2016, 6:01 AM
michalhumpula added a reviewer: michalhumpula.

The tests are passing for me before and after apllying the patch, so please commit to master.

This revision is now accepted and ready to land.Sep 3 2016, 6:01 AM

Thanks guys - this is quite likely a fix for https://bugs.kde.org/show_bug.cgi?id=367786

@leandrosantiago Do you already have commit rights, or should we commit this patch for you?

@dhaumann, no, I don't have commit rights. Please commit it for me.

Hi, mail address to use for author of commit?

Please use leandrosansilva@gmail.com

And author name: Leandro Santiago

cullmann closed this revision.Sep 3 2016, 3:33 PM

Submitted, thanks for the patch!

cullmann committed rKTEXTEDITORf9f6f2383f3a: Fix constant crashes related to the vi command bar (authored by leandrosantiago).

Fix constant crashes related to the vi command bar

Differential Revision: https://phabricator.kde.org/D2643

BUG: 367786

BRANCHES
master

AFFECTED FILES
/src/vimode/emulatedcommandbar/emulatedcommandbar.cpp

USERS
leandrosantiago (Author)
cullmann (Committer)

COMMIT
https://phabricator.kde.org/rKTEXTEDITORf9f6f2383f3a

EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/

To: leandrosantiago, cullmann