Changeset 37d941 for src/CodePatterns
- Timestamp:
- Aug 30, 2013, 10:52:22 PM (12 years ago)
- Children:
- b324a3
- Parents:
- f1df08
- File:
- 
      - 1 edited
 
 - 
          
  src/CodePatterns/Cacheable.hpp (modified) (3 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      src/CodePatterns/Cacheable.hpprf1df08 r37d941 180 180 // we sign on with the best(=lowest) priority, so cached values are recalculated before 181 181 // anybody else might ask for updated values 182 owner->signOn(this,Observable::PriorityLevel(int(-20))); 182 if (owner != NULL) 183 owner->signOn(this,Observable::PriorityLevel(int(-20))); 183 184 } 184 185 … … 192 193 const T Cacheable<T>::operator*() const{ 193 194 // we can only use the cacheable when the owner is not changing at the moment 194 if (!owner->isBlocked()){195 if ((owner == NULL) || (!owner->isBlocked())) { 195 196 return state->getValue(); 196 197 } … … 203 204 Cacheable<T>::~Cacheable() 204 205 { 205 owner->signOff(this); 206 if (owner != NULL) 207 owner->signOff(this); 206 208 } 207 209 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
