Check if shared surface is null while retreiving frames