Skip to content
Commit 21a7ef11 authored by David Edmundson's avatar David Edmundson
Browse files

Fix assert when pressing enter really quickly

Summary:
runCurrentIndex checks if "currentItem" is valid.
currentItem relies on the ListView being up-to-date.

The ListView also updates in response to QAIM::modelReset, the same
connection this code is attached to, so run afterwards.

This means the guard for currentItem is potentially out of date, and we
will call SourcesModel::run without a valid index on an empty source
model. This hits an assert.

modelReset and countChanged are identical as update resets
the model (which is wrong but a task for another day)

Test Plan:
Could reproduce the crash by typing ":q <enter>" really quickly
Could no longer reproduce

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D22612
parent 5698f9d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment