From 96c50abce282dfcc5925410018307d1415b94f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 15 Jan 2016 17:32:01 +0100 Subject: [PATCH] Prevent exception when selecting not inserted segments. --- src/item/Item.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/item/Item.js b/src/item/Item.js index e81e2dc1..b54de7df 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -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); + } } },