Fixed bug with getCurrentLayer when no current layer.

This commit is contained in:
Flint O'Brien
2016-04-30 21:11:02 -04:00
parent 575a056bd9
commit 26b7ac05a1
2 changed files with 3 additions and 2 deletions

View File

@@ -414,7 +414,7 @@ svgedit.draw.Drawing.prototype.getLayerName = function (i) {
* @returns {SVGGElement} The SVGGElement representing the current layer.
*/
svgedit.draw.Drawing.prototype.getCurrentLayer = function() {
return this.current_layer.getGroup();
return this.current_layer ? this.current_layer.getGroup() : null;
};
/**