Don't pass references to temporary objects, and handle the case where we dont have a Surface.
2 files changed