|
@@ -182,6 +182,11 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (max_drawn_tab <= 0) {
|
|
|
|
+ // Return early if there are no actual tabs to handle input for.
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
int found = -1;
|
|
int found = -1;
|
|
for (int i = offset; i <= max_drawn_tab; i++) {
|
|
for (int i = offset; i <= max_drawn_tab; i++) {
|
|
if (tabs[i].rb_rect.has_point(pos)) {
|
|
if (tabs[i].rb_rect.has_point(pos)) {
|