Avoid crashing when calling an invalid address.

We already have a check, let's use it properly.
Merge https://github.com/hrydgard/ppsspp