Gtk2: fixed crash on gtk2 64bit when an invalid index is passed to setPageIndex

git-svn-id: trunk@33963 -
This commit is contained in:
zeljko 2011-12-04 17:49:00 +00:00
parent 09e60d3eb7
commit 719c2296c9

View File

@ -475,7 +475,8 @@ var
begin
if not WSCheckHandleAllocated(ATabControl, 'SetPageIndex') then
Exit;
if (AIndex < 0) or (AIndex > ATabControl.PageCount - 1) then
exit;
GtkNotebook := PGtkNoteBook(ATabControl.Handle);
if gtk_notebook_get_current_page(GtkNotebook) <> AIndex then
begin