Fix null dereferencing issue for buttons

This commit is contained in:
Sam El-Husseini
2018-01-02 23:18:54 -08:00
parent 609740dc48
commit eb11d7926c
2 changed files with 2 additions and 1 deletions

View File

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