diff options
author | Vsevolod Kukol <sevo@xamarin.com> | 2016-08-03 13:43:10 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevo@xamarin.com> | 2016-08-03 13:43:10 +0300 |
commit | c4ef391daf00736abf6853b9262cfff3507ebdde (patch) | |
tree | 611d867e8f1087faffc66187ea6b5c7b53cf409a /Xwt.Gtk.Windows | |
parent | 2b0b4a730baec909b5fb9a50377dbcf33555fed6 (diff) |
[Gtk][Win] Fix NRE in WebViewBackend
Diffstat (limited to 'Xwt.Gtk.Windows')
-rw-r--r-- | Xwt.Gtk.Windows/WebViewBackend.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Xwt.Gtk.Windows/WebViewBackend.cs b/Xwt.Gtk.Windows/WebViewBackend.cs index c392c818..3923890e 100644 --- a/Xwt.Gtk.Windows/WebViewBackend.cs +++ b/Xwt.Gtk.Windows/WebViewBackend.cs @@ -210,9 +210,11 @@ namespace Xwt.Gtk.Windows void HandleNavigating (object sender, SWF.WebBrowserNavigatingEventArgs e) { if (enableNavigatingEvent) { - var url = e.Url.AbsoluteUri; + var newurl = string.Empty; + if (e.Url != null) + newurl = e.Url.AbsoluteUri; ApplicationContext.InvokeUserCode (delegate { - e.Cancel = EventSink.OnNavigateToUrl (url); + e.Cancel = EventSink.OnNavigateToUrl (newurl); }); } } |