From 36ee982b61e5350d643cd7d8701d8f719b89509f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 29 Jun 2009 22:50:16 -0400 Subject: [PATCH] sierra: ensure port is valid before doing stuff to it --- plugins/mm-modem-sierra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mm-modem-sierra.c b/plugins/mm-modem-sierra.c index d3f12629..69a7af30 100644 --- a/plugins/mm-modem-sierra.c +++ b/plugins/mm-modem-sierra.c @@ -150,7 +150,7 @@ grab_port (MMModem *modem, port = mm_generic_gsm_grab_port (gsm, subsys, name, ptype, error); - if (MM_IS_SERIAL_PORT (port)) + if (port && MM_IS_SERIAL_PORT (port)) g_object_set (G_OBJECT (port), MM_PORT_CARRIER_DETECT, FALSE, NULL); return !!port;