[dconf] engine: allow NULL handle
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] engine: allow NULL handle
- Date: Mon, 25 Nov 2013 20:24:17 +0000 (UTC)
commit f75da1af04b2e96bd46bc16d1feb5e4ce991b571
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Nov 25 15:21:32 2013 -0500
engine: allow NULL handle
We use a NULL handle in case we don't care about the return value. In that
case, we certainly don't care about the return type either, so use NULL for
expected_type in this case.
engine/dconf-engine.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index 706a856..af98cdf 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -707,7 +707,10 @@ dconf_engine_call_handle_new (DConfEngine *engine,
const GVariantType *
dconf_engine_call_handle_get_expected_type (DConfEngineCallHandle *handle)
{
- return handle->expected_reply;
+ if (handle)
+ return handle->expected_reply;
+ else
+ return NULL;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]