Prevent exception when selecting not inserted segments.

This commit is contained in:
Jürg Lehni 2016-01-15 17:32:01 +01:00
parent 9f448a97ef
commit 96c50abce2

View file

@ -593,8 +593,11 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
}
if ((selected = !!selected) ^ this._selected) {
this._selected = selected;
this._project._updateSelection(this);
this._changed(/*#=*/Change.ATTRIBUTE);
var project = this._project;
if (project) {
project._updateSelection(this);
this._changed(/*#=*/Change.ATTRIBUTE);
}
}
},