Diffusion Kate 8c7011c82586

Do not assume that list of documents is non-empty

Authored by tfry on Jan 13 2020, 10:53 AM.

Description

Do not assume that list of documents is non-empty

Summary: Host applications may not always have an active view, and a non-empty list of documents. This would currently crash when clicking the "Search"-button with "Current File" or "Open Files".

Test Plan: Tested with plugin loaded in RKWard, and no documents present. Segfault without patch, no matches, with patch.

Reviewers: cullmann, sars

Reviewed By: cullmann, sars

Subscribers: sars, kwrite-devel

Tags: Kate

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