### Method

# AppStream Component get_context

since: 0.11.2

#### Declaration [src]

    AsContext*
    as_component_get_context (
      AsComponent* cpt
    )

#### Description [src]

Get the `AsContext` associated with this component. This function may return `NULL` if no context is set (which will be the case if the component was not loaded from a file or cache but constructed in memory).

Available since: 0.11.2

#### Return value

Type: `AsContext`

The associated `AsContext` or `NULL`.

The returned data is owned by the instance.
The return value can be `NULL`.