To check if a subsurface is effectively synchronized, we walk the subsurface hierarchy to look for a non-subsurface parent or a subsurface being synchronized.
However, when client is closing, the parent surface might already be gone, in which case we end up with a surface being NULL which causes a NULL pointer dereference and a crash.
Check if the surface is NULL to avoid the crash, and consider it's desynchronized if it is.
Fixes: #124 (closed)