Fix crash in draw listener

Bug: 8528246

Change-Id: Ie3600bed58dc393fcf71f735213a32b51551b52d