1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-29 16:49:27 +01:00

FancyTabBar: Check that tab data is valid

This commit is contained in:
Jonas Kvinge 2024-11-02 01:28:37 +01:00
parent 5fede2551e
commit 4c0220d10a

View File

@ -52,7 +52,7 @@ FancyTabBar::FancyTabBar(QWidget *parent) :
}
QString FancyTabBar::TabText(const int index) const {
return tabText(index).isEmpty() ? ""_L1 : tabData(index).value<FancyTabData*>()->label();
return tabText(index).isEmpty() || !tabData(index).isValid() ? ""_L1 : tabData(index).value<FancyTabData*>()->label();
}
QSize FancyTabBar::sizeHint() const {