gs-app: Avoid using pointers before validation
We should avoid using a pointer before validating that it's the right type (at least when such checks aren't disabled).
Also, add some missing type checks.
This was pointed out by Will Thompson.
We should avoid using a pointer before validating that it's the right type (at least when such checks aren't disabled).
Also, add some missing type checks.
This was pointed out by Will Thompson.