From b86b2d3299bf3c99d87cd852099e7ec18a1cfb7b Mon Sep 17 00:00:00 2001 From: Zhenhua Zhang Date: Tue, 6 Jul 2010 17:57:37 +0800 Subject: gatppp: Check ppp instance before unref it --- gatchat/gatppp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index 1d41ded6..d9b16270 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -446,6 +446,9 @@ void g_at_ppp_unref(GAtPPP *ppp) { gboolean is_zero; + if (ppp == NULL) + return; + is_zero = g_atomic_int_dec_and_test(&ppp->ref_count); if (is_zero == FALSE) -- cgit v1.2.1