Workaround for #2259, although I haven't been able to reproduce when it happens.

This commit is contained in:
Nick Winter 2015-02-09 11:11:52 -08:00
parent 7b34f90230
commit 5decf7ae36

View file

@ -47,7 +47,7 @@ module.exports = class Label extends CocoClass
@layer.updateLayerOrder()
update: ->
return unless @text
return unless @text and @sprite.sprite
offset = @sprite.getOffset? (if @style in ['dialogue', 'say'] then 'mouth' else 'aboveHead')
offset ?= x: 0, y: 0 # temp (if not Lank)
rotation = @sprite.getRotation()