GLib.assert_nonnull
Description: Reference for GLib.assert_nonnull

### Function Macro

# GLibassert_nonnull

since: 2.40

#### Declaration

    #define g_assert_nonnull (
      expr
    )

#### Description

Debugging macro to check an expression is not `NULL`.

If the assertion fails (i.e. the expression is `NULL`), an error message is logged and the application is either terminated or the testcase marked as failed.

Note that unlike g_assert(), this macro is unaffected by whether `G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, conversely, `g_assert()` should not be used in tests.

See g_test_set_nonfatal_assertions().

Available since: 2.40

This function is not directly available to language bindings.

#### Parameters

`expr`

  Type: `-`

  The expression to check.