g_return_val_if_fail can't be used in void function