D19532: Don't crash when no contexts are present
Dāvis Mosāns
noreply at phabricator.kde.org
Tue Mar 5 18:52:01 GMT 2019
davispuh added a comment.
In D19532#424926 <https://phabricator.kde.org/D19532#424926>, @cullmann wrote:
> Hi, first: good thing to get this fixed, yes, it shall not crash.
>
> For the fix: Wouldn't it be enough to just change the
>
> if (!d->m_definition.isValid()) {
>
> applyFormat(0, text.size(), Format());
>
> ...
>
> shortcut to check for
>
> if (!d->m_definition.isValid() || defData->isLoaded()) {
No, because `defData` isn't defined there yet, it's created only later with `auto defData = DefinitionData::get(d->m_definition);`
REPOSITORY
R216 Syntax Highlighting
REVISION DETAIL
https://phabricator.kde.org/D19532
To: davispuh, cullmann, dhaumann, vandenoever
Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190305/fd87bb62/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list