Diffusion Baloo 4fa98ca84fb3

Avoid potential nullptr access for Document, use reference instead

Authored by bruns on Dec 2 2018, 8:38 PM.

Description

Avoid potential nullptr access for Document, use reference instead

Summary:
Using a TermGenerator without backing document is pointless and can
even crash when the document has been initialized with a nullptr.

Test Plan: ctest

Reviewers: Baloo, Frameworks, astippich, ngraham

Reviewed By: astippich

Subscribers: kde-frameworks-devel

Tags: Frameworks, Baloo

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