summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-04 15:02:03 +0200
committerSimon Rettberg2019-07-04 15:02:03 +0200
commit063002da08916b80fe459a8ae8cbd9a543538ef1 (patch)
treec17172e025e8ba7813beecd5f6ae5180411c720d /src
parentAddress timing issues with WM spawning (diff)
downloadvmchooser2-063002da08916b80fe459a8ae8cbd9a543538ef1.tar.gz
vmchooser2-063002da08916b80fe459a8ae8cbd9a543538ef1.tar.xz
vmchooser2-063002da08916b80fe459a8ae8cbd9a543538ef1.zip
Fix infinite loop if all three lists are empty
Diffstat (limited to 'src')
-rw-r--r--src/dialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp
index 932f28c..56860f2 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -842,7 +842,7 @@ void Dialog::on_leftKey() {
int i = activeTab_;
do {
i = (i - 1 + TAB_COUNT) % TAB_COUNT;
- } while (!tabs_[i]->isEnabled());
+ } while (!tabs_[i]->isEnabled() && i != activeTab_);
onTabButtonChanged(i);
}
@@ -850,7 +850,7 @@ void Dialog::on_rightKey() {
int i = activeTab_;
do {
i = (i + 1) % TAB_COUNT;
- } while (!tabs_[i]->isEnabled());
+ } while (!tabs_[i]->isEnabled() && i != activeTab_);
onTabButtonChanged(i);
}