Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8655


Ignore:
Timestamp:
May 29, 2011, 10:31:15 AM (14 years ago)
Author:
landauf
Message:

fixed crashing assertion in case a template linked to a non-existing template

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/libraries/core/BaseObject.cc

    r7401 r8655  
    195195    void BaseObject::addTemplate(Template* temp)
    196196    {
     197        // network
     198        if (temp->isLink())
     199        {
     200            this->networkTemplateNames_.insert(temp->getLink());
     201           
     202            Template* link;
     203            assert(!(link = Template::getTemplate(temp->getLink())) || !link->isLink());
     204        }
     205        else
     206            this->networkTemplateNames_.insert(temp->getName());
     207
     208        // add template
    197209        this->templates_.insert(temp);
    198         if( temp->isLink() )
    199         {
    200           this->networkTemplateNames_.insert(temp->getLink());
    201           assert( !Template::getTemplate(temp->getLink())->isLink() );
    202         }
    203         else
    204           this->networkTemplateNames_.insert(temp->getName());
    205210        temp->applyOn(this);
    206211    }
Note: See TracChangeset for help on using the changeset viewer.