The function TabBar::sessionAtTab(int index) is exposed through QDBus and if a user/script passes a negative number, yakuake crashes with index out of range.
This patch fixes that behaviour with a sanity check. If the user passes a negative number, return -1.