Browse Source

Fix and improve switch camera and its error handling

Kristian Vos 10 months ago
parent
commit
98108a7f74
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main.c

+ 1 - 1
src/main.c

@@ -730,7 +730,7 @@ static void
 run_camera_switch_action(GSimpleAction *action, GVariant *param, gpointer user_data)
 {
         int new_index = state.camera->index + 1;
-        if (new_index > state.configuration->count) {
+        if (new_index > state.configuration->count - 1 || new_index < 0) {
                 new_index = 0;
         }