From b0c26bcec2183d8fe8d6609abfd95a5de1d5fd27 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 12 Jan 2016 21:14:04 +0100 Subject: [PATCH] Fix return values in property getters --- src/matrix-api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matrix-api.c b/src/matrix-api.c index 28015b6..ef97bbe 100644 --- a/src/matrix-api.c +++ b/src/matrix-api.c @@ -192,7 +192,7 @@ matrix_api_default_init(MatrixAPIInterface *iface) const gchar * matrix_api_get_token(MatrixAPI *api) { - g_return_if_fail(MATRIX_IS_API(api)); + g_return_val_if_fail(MATRIX_IS_API(api), NULL); return MATRIX_API_GET_IFACE(api) ->get_token(api); @@ -233,7 +233,7 @@ matrix_api_set_token(MatrixAPI *api, const gchar *token) const gchar * matrix_api_get_refresh_token(MatrixAPI *api) { - g_return_if_fail(MATRIX_IS_API(api)); + g_return_val_if_fail(MATRIX_IS_API(api), NULL); return MATRIX_API_GET_IFACE(api) ->get_refresh_token(api); @@ -274,7 +274,7 @@ matrix_api_set_refresh_token(MatrixAPI *api, const gchar *refresh_token) const gchar * matrix_api_get_user_id(MatrixAPI *api) { - g_return_if_fail(MATRIX_IS_API(api)); + g_return_val_if_fail(MATRIX_IS_API(api), NULL); return MATRIX_API_GET_IFACE(api) ->get_user_id(api); @@ -296,7 +296,7 @@ matrix_api_get_user_id(MatrixAPI *api) const gchar * matrix_api_get_homeserver(MatrixAPI *api) { - g_return_if_fail(MATRIX_IS_API(api)); + g_return_val_if_fail(MATRIX_IS_API(api), NULL); return MATRIX_API_GET_IFACE(api) ->get_homeserver(api);