Only try unset surface if native window is alive
Sometimes WindowShadow::internalDestroy is called when the window is being destroyed. In that case, recreating the window in surfaceForWindow(...) causes segfault. Only call surfaceForWindow and unset the surface if the native window is alive. CCBUG: 478990
Please register or sign in to comment