From fcda30b15913fabe3957a2adceb118705f571ae6 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Thu, 19 Feb 2015 11:29:33 +0300 Subject: [PATCH] fix dlangide issue 33 - openging of .json file in editor causes crash --- src/dlangui/core/editable.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dlangui/core/editable.d b/src/dlangui/core/editable.d index e73f1301..74b1a744 100644 --- a/src/dlangui/core/editable.d +++ b/src/dlangui/core/editable.d @@ -503,8 +503,10 @@ class EditableContent { @property EditableContent syntaxHighlighter(SyntaxHighlighter syntaxHighlighter) { _syntaxHighlighter = syntaxHighlighter; - _syntaxHighlighter.content = this; - updateTokenProps(0, cast(int)_lines.length); + if (_syntaxHighlighter) { + _syntaxHighlighter.content = this; + updateTokenProps(0, cast(int)_lines.length); + } return this; }