diff --git a/widgets/tabbar.cpp b/widgets/tabbar.cpp index 80a16f626..bbe4b471a 100644 --- a/widgets/tabbar.cpp +++ b/widgets/tabbar.cpp @@ -339,7 +339,7 @@ void TabBar::setCurrentIndex(int index) d->newPage = 0; } - if (d->newPage) { + if (d->newPage && d->oldPage) { d->newPage->resize(d->oldPage->size()); }