Use g_return_val_if_fail where return value needed.