sdl: Fix crash when calling sdl_switch() with NULL surface