x86: fix NULL pointer deref in __switch_to