forked from AuroraMiddleware/gtk
Handle out-of-bounds parameters in gtk_assistant_get_nth_page
Better do what the docs say...fix by Tadej Borovšak, bug 610141.
This commit is contained in:
parent
ddcc305f4e
commit
06d02578f8
@ -1615,10 +1615,14 @@ gtk_assistant_get_nth_page (GtkAssistant *assistant,
|
|||||||
GList *elem;
|
GList *elem;
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_ASSISTANT (assistant), NULL);
|
g_return_val_if_fail (GTK_IS_ASSISTANT (assistant), NULL);
|
||||||
|
g_return_val_if_fail (page_num >= -1, NULL);
|
||||||
|
|
||||||
priv = assistant->priv;
|
priv = assistant->priv;
|
||||||
|
|
||||||
elem = g_list_nth (priv->pages, page_num);
|
if (page_num == -1)
|
||||||
|
elem = g_list_last (priv->pages);
|
||||||
|
else
|
||||||
|
elem = g_list_nth (priv->pages, page_num);
|
||||||
|
|
||||||
if (!elem)
|
if (!elem)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user