diff options
author | Jeremie Laval <jeremie.laval@gmail.com> | 2012-02-16 19:07:53 +0400 |
---|---|---|
committer | Jeremie Laval <jeremie.laval@gmail.com> | 2012-02-16 19:07:53 +0400 |
commit | 4b5f041aa39c09c29e57b1d4eb87be3c125976c3 (patch) | |
tree | 492c5e2bbb6940eb77829076175a87946ef6a234 /MyDocument.cs | |
parent | 2ad995f21b75d8e7b6e3195fbfadbfec3d832f1f (diff) |
[macdoc] Fix crash when using node. Some element may have content but no node per se.
Diffstat (limited to 'MyDocument.cs')
-rw-r--r-- | MyDocument.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MyDocument.cs b/MyDocument.cs index 2d73d8b..4e07fbf 100644 --- a/MyDocument.cs +++ b/MyDocument.cs @@ -207,9 +207,9 @@ namespace macdoc BeginInvokeOnMainThread (() => { if (ts < loadUrlTimestamp) return; - currentUrl = node.PublicUrl; + currentUrl = node == null ? url : node.PublicUrl; if (addToHistory) - history.AppendHistory (new LinkPageVisit (this, node.PublicUrl)); + history.AppendHistory (new LinkPageVisit (this, currentUrl)); LoadHtml (res); if (syncTreeView) { // When navigation occurs after a link on search result is clicked |