Fix null ref for this when _update is called.

This commit is contained in:
Sam El-Husseini
2018-01-03 11:20:37 -08:00
parent 1c81ecd23f
commit 2b5f702bb6
2 changed files with 3 additions and 2 deletions

View File

@ -66,7 +66,7 @@ namespace brick {
//% hidden
_update(curr: boolean) {
if (curr === null) return
if (this == null) return
if (this._isPressed == curr) return
this._isPressed = curr
if (curr) {