/pidgin/main: 9605c0a2839e: Don't crash when cancelling non-exis...
Mark Doliner
mark at kingant.net
Mon Oct 22 02:24:16 EDT 2012
On Sun, Oct 21, 2012 at 4:27 PM, Tomasz Wasilczyk
<tomkiewicz at cpw.pidgin.im> wrote:
> Changeset: 9605c0a2839e45db17956dce504a31c6170a94e5
> Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
> Date: 2012-10-22 01:27 +0200
> Branch: default
> URL: http://hg.pidgin.im/pidgin/main/rev/9605c0a2839e
>
> Description:
>
> Don't crash when cancelling non-existent HTTP connection
>
> diffstat:
>
> libpurple/http.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diffs (13 lines):
>
> diff --git a/libpurple/http.c b/libpurple/http.c
> --- a/libpurple/http.c
> +++ b/libpurple/http.c
> void purple_http_conn_cancel(PurpleHttpConnection *http_conn)
> {
> + if (http_conn == NULL)
> + return;
> +
Hey Tomasz, is there a legitimate reason to call this function with
null? I feel like it might be cleaner to use
g_return_if_fail(http_conn != NULL), but I also don't have a strong
opinion.
More information about the Devel
mailing list