From: Steve Lamerton Date: Fri, 6 Sep 2013 09:50:58 +0000 (+0000) Subject: Fix history storing in wxWebViewWebKit with custom schemes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/111d847de560f452ecebd42fa99324222a0d9f62 Fix history storing in wxWebViewWebKit with custom schemes. 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 --- diff --git a/src/gtk/webview_webkit.cpp b/src/gtk/webview_webkit.cpp index 12bdd3ded4..bcf8524953 100644 --- a/src/gtk/webview_webkit.cpp +++ b/src/gtk/webview_webkit.cpp @@ -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