VirtualBox

Changeset 17347 in vbox


Ignore:
Timestamp:
Mar 4, 2009 3:13:46 PM (16 years ago)
Author:
vboxsync
Message:

#3697: “Snapshot UI crashes in VBoxSVC”
Don't assume collection's GetItemAt(0) and safearray indexing with [0] are equivalent.
Instead, test if safearray has an element before indexing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r17278 r17347  
    26612661                               regExp.cap (1).toInt() : maxSnapShotIndex;
    26622662        /* Traversing to the next child */
    2663         index = index.GetChildren()[0];
     2663        CSnapshotVector c = index.GetChildren();
     2664        if (c.size() > 0)
     2665            index = c[0];
     2666        else
     2667            break;
    26642668    }
    26652669    dlg.mLeName->setText (snapShotName.arg (maxSnapShotIndex + 1));
Note: See TracChangeset for help on using the changeset viewer.

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