submodule: use g_return_val_if_fail to fix the build