EMBPD00115358fix-TabBaar crash on switchtab(-1)

EMBPD00115358fix-TabBaar crash on switchtab(-1).
Check has been added for tabbar valid index.