Merge pull request #200 from ScottIsAFool/Fix-MoveAdjacentToElement-Error

Issue #188 - Fix MoveAdjacentToElement Error
This commit is contained in:
Will Duff 2015-12-22 00:41:37 -08:00
commit 3670728585
1 changed files with 1 additions and 1 deletions

View File

@ -1186,7 +1186,7 @@ namespace OpenLiveWriter.HtmlEditor
OnDocumentComplete(e);
// Remove null-attributed font tags, e.g. <p><font>blah</font></p> --> <p>blah</p>
if (DocumentIsReady)
if (DocumentIsReady && PostBodyElement != null)
{
MarkupRange bodyRange = MarkupServices.CreateMarkupRange(PostBodyElement);
bodyRange.RemoveElementsByTagId(_ELEMENT_TAG_ID.TAGID_FONT, true);