]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix history storing in wxWebViewWebKit with custom schemes.
authorSteve Lamerton <steve.lamerton@gmail.com>
Fri, 6 Sep 2013 09:50:58 +0000 (09:50 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Fri, 6 Sep 2013 09:50:58 +0000 (09:50 +0000)
When the history has just been cleared there is no existing item so we should add the new history item even in this case.

Fixes #15446.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/webview_webkit.cpp

index 12bdd3ded4d621d0d70ab584d7fe97d376056962..bcf852495344c621400379d29fda6c66c1c3059b 100644 (file)
@@ -46,7 +46,8 @@ wxgtk_webview_webkit_load_status(GtkWidget* widget,
         //We have to check if we are actually storing history
         //If the item isn't added we add it ourselves, it isn't added otherwise
         //with a custom scheme.
-        if(WEBKIT_IS_WEB_HISTORY_ITEM(item) && webkit_web_history_item_get_uri(item) != url)
+        if(!item || (WEBKIT_IS_WEB_HISTORY_ITEM(item) && 
+                     webkit_web_history_item_get_uri(item) != url))
         {
             WebKitWebHistoryItem*
                 newitem = webkit_web_history_item_new_with_data