VirtualBox

Ignore:
Timestamp:
Jun 26, 2009 2:38:55 PM (15 years ago)
Author:
vboxsync
Message:

API: weed out NULL strings, as many clients cannot use them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MediumImpl.cpp

    r19239 r20977  
    7575    AutoReadLock alock (this);
    7676
    77     m.description.cloneTo (aDescription);
     77    if (m.description.isEmpty())
     78        Bstr("").cloneTo(aDescription);
     79    else
     80        m.description.cloneTo (aDescription);
    7881
    7982    return S_OK;
     
    199202    AutoReadLock alock (this);
    200203
    201     m.lastAccessError.cloneTo (aLastAccessError);
     204    if (m.lastAccessError.isEmpty())
     205        Bstr("").cloneTo(aLastAccessError);
     206    else
     207        m.lastAccessError.cloneTo (aLastAccessError);
    202208
    203209    return S_OK;
     
    969975        /* if the image file is not accessible, it's not acceptable for the
    970976         * newly opened media so convert this into an error */
    971         if (!m.lastAccessError.isNull())
     977        if (!m.lastAccessError.isEmpty())
    972978            rc = setError (VBOX_E_FILE_ERROR, Utf8Str (m.lastAccessError));
    973979    }
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