You could check the result of getTab before calling anything on it.

Qt Code:
  1. readonly property Tab currentTab: getTab(currentIndex)
  2. height: currentTab ? currentTab.childrenRect.height : 0
To copy to clipboard, switch view to plain text mode 

Cheers,
_