Skip to content

Commit

Permalink
Avoid reading uninitialized member variable
Browse files Browse the repository at this point in the history
m_historyLimit is unused with webkit2
  • Loading branch information
paulcor committed Jun 15, 2017
1 parent b9c9fc3 commit 188b249
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gtk/webview_webkit2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,7 @@ wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetBackwardHistory
wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist;
WebKitBackForwardList* history =
webkit_web_view_get_back_forward_list(m_web_view);
GList* list = webkit_back_forward_list_get_back_list_with_limit(history,
m_historyLimit);
GList* list = webkit_back_forward_list_get_back_list(history);
//We need to iterate in reverse to get the order we desire
for(int i = g_list_length(list) - 1; i >= 0 ; i--)
{
Expand All @@ -686,8 +685,7 @@ wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetForwardHistory(
wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist;
WebKitBackForwardList* history =
webkit_web_view_get_back_forward_list(m_web_view);
GList* list = webkit_back_forward_list_get_forward_list_with_limit(history,
m_historyLimit);
GList* list = webkit_back_forward_list_get_forward_list(history);
for(guint i = 0; i < g_list_length(list); i++)
{
WebKitBackForwardListItem* gtkitem = (WebKitBackForwardListItem*)g_list_nth_data(list, i);
Expand Down

0 comments on commit 188b249

Please sign in to comment.