[ostree] repo: Fix assertion to allow NULL options
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] repo: Fix assertion to allow NULL options
- Date: Wed, 4 Mar 2015 02:19:29 +0000 (UTC)
commit 191d78ebfc2825d698da5f1eb0267a8570da84d6
Author: Colin Walters <walters verbum org>
Date: Tue Mar 3 21:18:40 2015 -0500
repo: Fix assertion to allow NULL options
Spotted by Adam Coldrick.
src/libostree/ostree-repo.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 5702825..558d008 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -671,7 +671,7 @@ impl_repo_remote_add (OstreeRepo *self,
g_return_val_if_fail (name != NULL, FALSE);
g_return_val_if_fail (url != NULL, FALSE);
- g_return_val_if_fail (g_variant_is_of_type (options, G_VARIANT_TYPE ("a{sv}")), FALSE);
+ g_return_val_if_fail (options == NULL || g_variant_is_of_type (options, G_VARIANT_TYPE ("a{sv}")), FALSE);
if (strchr (name, '/') != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]