VirtualBox

Changeset 16656 in vbox for trunk


Ignore:
Timestamp:
Feb 11, 2009 11:06:41 AM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: Check if the appliance is valid after an early error.

File:
1 edited

Legend:

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

    r16617 r16656  
    20902090void VBoxProblemReporter::cannotImportAppliance (const CAppliance &aAppliance)
    20912091{
    2092     message (mainWindowShown(),
    2093              Error,
    2094              tr ("Failed to open/interpret appliance <b>%1</b>.").arg (aAppliance.GetPath()),
    2095              formatErrorInfo (aAppliance));
     2092    if (aAppliance.isNull())
     2093    {
     2094        message (mainWindowShown(),
     2095                 Error,
     2096                 tr ("Failed to open appliance."));
     2097    }else
     2098    {
     2099        /* Preserve the current error info before calling the object again */
     2100        COMResult res (aAppliance);
     2101
     2102        message (mainWindowShown(),
     2103                 Error,
     2104                 tr ("Failed to open/interpret appliance <b>%1</b>.").arg (aAppliance.GetPath()),
     2105                 formatErrorInfo (res));
     2106    }
    20962107}
    20972108
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