[][src]Attribute Macro skyline::null_check

#[null_check]

Add a null check to dynamically linked functions. Applied at the extern block level.

Example:

#[null_check]
extern "C" {
    fn not_an_available_import() -> u64;
}

Then, if not_an_available_import is not available it will panic with the following message:

thread '<unnamed>' panicked at 'not_an_available_import is null (likely unlinked)', src/lib.rs:5:1

Note

Due to a bug, this may not consistently panic on release builds, use --debug for install/run commands to ensure this does not happen when testing.