summary refs log tree commit diff
path: root/src/supplicant-manager/nm-call-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/supplicant-manager/nm-call-store.c')
-rw-r--r--src/supplicant-manager/nm-call-store.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/supplicant-manager/nm-call-store.c b/src/supplicant-manager/nm-call-store.c
index 4b427549..6e910a96 100644
--- a/src/supplicant-manager/nm-call-store.c
+++ b/src/supplicant-manager/nm-call-store.c
@@ -19,6 +19,8 @@
  * Copyright (C) 2010 Red Hat, Inc.
  */
 
+#include "config.h"
+
 #include "nm-call-store.h"
 #include "nm-logging.h"
 
@@ -44,7 +46,13 @@ nm_call_store_add (NMCallStore *store,
 
 	g_return_if_fail (store != NULL);
 	g_return_if_fail (proxy != NULL);
-	g_return_if_fail (call != NULL);
+
+	if (!call) {
+		/* Allow calling nm_call_store_add() with NULL @call for convenience.
+		 * This way you can pass the result of dbus_g_proxy_begin_call() directly
+		 * to nm_call_store_add() without checking for NULL. */
+		return;
+	}
 
 	calls = g_hash_table_lookup (store, proxy);
 	if (!calls) {