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".
Tested with plugin loaded in RKWard, and no documents present. Segfault without patch, no matches, with patch.
Hm, any hint, why I'm getting this?
remote: FATAL: W refs/heads/master kate tfry DENIED by refs/.* remote: error: hook declined to update refs/heads/master To git.kde.org:kate ! [remote rejected] 3b2561e34af7387b4722e108e7aae648563e5d69 -> master (hook declined) error: failed to push some refs to 'firstname.lastname@example.org:kate'