### Method

# Ide Task get_source_object

#### Declaration

    GObject*
    ide_task_get_source_object (
      IdeTask* self
    )

#### Description

Gets the `GObject` used when creating the source object.

As this does not provide ownership transfer of the `GObject`, it is a programmer error to call this function outside of a thread worker called from `ide_task_run_in_thread()` or outside the `GMainContext` that is associated with the task.

If you need to access the object in other scenarios, you must use the `g_async_result_get_source_object()` which provides a full reference to the source object, safely. You are responsible for ensuring that you do not release the object in a manner that is unsafe for the source object.

Available since: | 3.32
This method is not directly available to language bindings.

#### Return value

Returns: | `GObject`
| A `GObject` or `NULL`.
| The data is owned by the instance.
| The return value can be `NULL`.