--- qtbase/src/widgets/widgets/qtabbar.cpp.orig	2023-03-23 15:06:47.000000000 -0400
+++ qtbase/src/widgets/widgets/qtabbar.cpp	2023-04-13 15:19:52.000000000 -0400
@@ -2190,7 +2190,8 @@
                 }
             }
             // Buttons needs to follow the dragged tab
-            d->layoutTab(d->pressedIndex);
+            if (d->pressedIndex != -1)
+                d->layoutTab(d->pressedIndex);
 
             update();
         }
