Fix crash by NULL remote surface