sierra: ensure port is valid before doing stuff to it

This commit is contained in:
Dan Williams
2009-06-29 22:50:16 -04:00
parent 78633192d2
commit 36ee982b61
+1 -1
View File
@@ -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;