[librest/wip/baedert/gtask2: 3/8] rest-proxy: Fix precondition in new_call
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librest/wip/baedert/gtask2: 3/8] rest-proxy: Fix precondition in new_call
- Date: Thu, 14 Jul 2016 16:32:45 +0000 (UTC)
commit 430da5974d2479f128d28c4caf7177a1da6c9e88
Author: Timm Bäder <mail baedert org>
Date: Thu Jul 14 12:34:20 2016 +0200
rest-proxy: Fix precondition in new_call
rest/rest-proxy.c | 6 +++++-
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]