EMBPD00115358fix-TabBaar crash on switchtab(-1)

EMBPD00115358fix-TabBaar crash on switchtab(-1).
Check has been added for tabbar valid index.
Merge pull request #342 from rhomobile/EMBPD00115358_TabbarCrashFix

EMBPD00115358fix-TabBaar crash on switchtab(-1)