I was getting some warnings from gjs because it was trying to call g_error_free()
on a NULL pointer. I eventually tracked it down to using this function:
/**
* htsp_message_to_error: (skip):
* @msg: (transfer none):
* Returns: (transfer full) (nullable):
*
* Makes a GError from a message with an error field. Returns NULL if the
* message doesn't have an error field.
*
* This can't be used from gjs, because it seems to try to free the result.
* Use htsp_message_get_error() instead.
*/
GError *htsp_message_to_error(const GstStructure *msg);
I added the (skip)
and the last paragraph of the comment after discovering it was a problem.
Is this a bug in gjs, or are you not allowed to return errors this way in introspected code?