summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fd62d7a)
if (audio_sources.count(id))
return new MementoCommand<AudioSource>(*audio_sources[id], before, after);
} else if (obj_T == typeid (Location).name()) {
if (audio_sources.count(id))
return new MementoCommand<AudioSource>(*audio_sources[id], before, after);
} else if (obj_T == typeid (Location).name()) {
- return new MementoCommand<Location>(*_locations.get_location_by_id(id), before, after);
+ Location* loc = _locations.get_location_by_id(id);
+ if (loc) {
+ return new MementoCommand<Location>(*loc, before, after);
+ }
} else if (obj_T == typeid (Locations).name()) {
return new MementoCommand<Locations>(_locations, before, after);
} else if (obj_T == typeid (TempoMap).name()) {
} else if (obj_T == typeid (Locations).name()) {
return new MementoCommand<Locations>(_locations, before, after);
} else if (obj_T == typeid (TempoMap).name()) {