Fixed NPE while zooming with mouse wheel (#87)

Fixed #87. Just added a null check in setScale.