Code: Prevents HtmlEditorDocument from crashing.
* Issue reported by @sqmgh at #1527.
* Fixed suggested by @spadapet at #1527.
* Original issue #1527 still unknown.
Merge pull request #1532 from am11/master

Code: Prevents HtmlEditorDocument from crashing