Commit e089659a authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

comctl32: Do not crash when the startpage is invalid.

parent 7cd9400b
......@@ -2824,6 +2824,9 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
}
}
if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0;
TRACE("startpage: %d of %d pages\n", psInfo->active_page, psInfo->nPages);
psInfo->unicode = FALSE;
psInfo->ended = FALSE;
......@@ -2875,6 +2878,9 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
}
}
if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0;
TRACE("startpage: %d of %d pages\n", psInfo->active_page, psInfo->nPages);
psInfo->unicode = TRUE;
psInfo->ended = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment