Fix regression causing wrong tab URL "ghost" in urlbar

This commit is contained in:
Christian Dywan 2012-07-19 01:27:48 +02:00
parent 31fe130f87
commit 7c5410468f

View file

@ -8054,6 +8054,8 @@ midori_browser_get_current_tab (MidoriBrowser* browser)
{ {
#ifdef HAVE_GRANITE #ifdef HAVE_GRANITE
GraniteWidgetsTab* tab; GraniteWidgetsTab* tab;
#else
gint n;
#endif #endif
g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL); g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL);
@ -8063,8 +8065,8 @@ midori_browser_get_current_tab (MidoriBrowser* browser)
GRANITE_WIDGETS_DYNAMIC_NOTEBOOK (browser->notebook)); GRANITE_WIDGETS_DYNAMIC_NOTEBOOK (browser->notebook));
return tab ? granite_widgets_tab_get_page (tab) : NULL; return tab ? granite_widgets_tab_get_page (tab) : NULL;
#else #else
return midori_browser_get_nth_tab (browser, n = midori_browser_get_current_page (browser);
midori_browser_get_current_page (browser)); return (n >= 0) ? midori_browser_get_nth_tab (browser, n) : NULL;
#endif #endif
} }