### Function

# GLib propagate_error

since: 2.0

#### Declaration

    void
    g_propagate_error (
      GError** dest,
      GError* src
    )

#### Description

If `dest` is `NULL`, free `src`; otherwise, moves `src` into *`dest`. The error variable `dest` points to must be `NULL`.

`src` must be non-`NULL`.

Note that `src` is no longer valid after this call. If you want to keep using the same GError*, you need to set it to `NULL` after calling this function on it.

Available since: 2.0

#### Parameters

`dest`

  Type: `GError`

  Error return location.

  The argument will be set by the function.
  The argument can be set to `NULL` by the function.
  The argument can be `NULL`.
  The caller of the function takes ownership of the data, and is responsible for freeing it.

`src`

  Type: `GError`

  Error to move into the return location.

  The called function takes ownership of the data, and is responsible for freeing it.