Changeset 9269


Ignore:
Timestamp:
01/26/09 11:05:51 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MParEnv.cc

    r9268 r9269  
    150150// the result must inherit from fClassName.
    151151//
     152// After successfull creation of the new class (or if a class was set already
     153// before and not overwritten in the resource file) the container's ReadEnv
     154// is called.
     155//
    152156// WARNING: Especially in the second case oyu can do weird thing which
    153157//          in principle can result in crashes. Please be extra-carefull.
     
    178182    }
    179183
    180     if (!rc)
     184    if (!rc && !fCont) // FIXME: fAllowEmpty
    181185        return kFALSE;
    182186
    183     SetCont(cont);
    184     if (!fCont)
    185     {
    186         if (cont)
    187             delete cont;
     187    if (rc)
     188    {
     189        SetCont(cont);
     190        if (!fCont)
     191        {
     192            if (cont)
     193                delete cont;
     194            return kERROR;
     195        }
     196        fIsOwner = kTRUE;
     197    }
     198
     199    const Int_t res = fCont->ReadEnv(env, prefix, print);
     200    if (res==kERROR)
    188201        return kERROR;
    189     }
    190     fIsOwner = kTRUE;
    191     return kTRUE;
    192 }
     202
     203    return rc ? rc : res;
     204}
Note: See TracChangeset for help on using the changeset viewer.