summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2016-07-14 12:34:20 +0200
committerTimm Bäder <mail@baedert.org>2016-07-14 18:30:27 +0200
commit430da5974d2479f128d28c4caf7177a1da6c9e88 (patch)
treefed290cd4485ad97bd1d873a4a9983b0b857025f
parent672c2b8a6d379ca71c328cbcc30a20532fe46a4e (diff)
downloadlibrest-430da5974d2479f128d28c4caf7177a1da6c9e88.tar.gz
rest-proxy: Fix precondition in new_call
-rw-r--r--rest/rest-proxy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/rest/rest-proxy.c b/rest/rest-proxy.c
index 086c217..ca42aac 100644
--- a/rest/rest-proxy.c
+++ b/rest/rest-proxy.c
@@ -598,7 +598,11 @@ _rest_proxy_new_call (RestProxy *proxy)
RestProxyCall *
rest_proxy_new_call (RestProxy *proxy)
{
- RestProxyClass *proxy_class = REST_PROXY_GET_CLASS (proxy);
+ RestProxyClass *proxy_class;
+
+ g_return_val_if_fail (REST_IS_PROXY (proxy), NULL);
+
+ proxy_class = REST_PROXY_GET_CLASS (proxy);
return proxy_class->new_call (proxy);
}