A few fixes to prevent compositor crashes
If a client application exits abruptly while in direct
rendering mode, the surface buffer could reference a null buffer.
We now check for this before attempting to use such a surface
buffer. It is also possible for WaylandSurfaceNode::preprocess to
be called after WaylandSurfaceItem has called surfaceDestroyed, so
now we check for a valid surface in preprocess as well.
Change-Id: Ibca71349b7a24687944f8b6cd505941b580e0c2a
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>