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
Please register or sign in to comment