ppp: Don't crash if the interface wasn't created

This commit is contained in:
Denis Kenzior 2010-04-28 17:05:06 -05:00
parent db0b7c8a98
commit d271216112
1 changed files with 4 additions and 0 deletions

View File

@ -235,6 +235,10 @@ void ppp_net_up_notify(GAtPPP *ppp, const char *ip,
void ppp_net_down_notify(GAtPPP *ppp)
{
/* Most likely we failed to create the interface */
if (ppp->net == NULL)
return;
ppp_net_free(ppp->net);
ppp->net = NULL;
}