VirtualBox

Ignore:
Timestamp:
Sep 13, 2024 9:00:05 AM (7 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164792
Message:

FE/Qt: bugref:10659:. Check header counts before resizing columns. This was causing a divide by zero when there is no VM registered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewModelView.cpp

    r105081 r106042  
    685685{
    686686    QHeaderView* pHeader = horizontalHeader();
    687     if (!pHeader)
     687    if (!pHeader || pHeader->count() <= 0)
    688688        return;
    689689    int iSectionCount = pHeader->count();
    690690    int iHiddenSectionCount = pHeader->hiddenSectionCount();
     691    if (iSectionCount == iHiddenSectionCount)
     692        return;
    691693    int iWidth = width() / (iSectionCount - iHiddenSectionCount);
    692694    for (int i = 0; i < iSectionCount; ++i)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette