diff options
author | Dan Williams <dcbw@redhat.com> | 2008-05-01 15:27:15 +0000 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-05-01 15:27:15 +0000 |
commit | 8531f91acceb937e6b76b9bfe0600480503aa780 (patch) | |
tree | 4fb70df717d2ca0304de6bd067e98a604d654b21 /src/nm-hal-manager.c | |
parent | c39d6e32d8de3ab034402f3978591f17efd7fe90 (diff) | |
download | NetworkManager-8531f91acceb937e6b76b9bfe0600480503aa780.tar.gz |
Don't segfault on systems using older HAL modem capabilities
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3625 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'src/nm-hal-manager.c')
-rw-r--r-- | src/nm-hal-manager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nm-hal-manager.c b/src/nm-hal-manager.c index f006bb9b80..052f7f4f5d 100644 --- a/src/nm-hal-manager.c +++ b/src/nm-hal-manager.c @@ -240,7 +240,8 @@ modem_device_creator (NMHalManager *self, const char *udi, gboolean managed) goto out; capabilities = libhal_device_get_property_strlist (priv->hal_ctx, udi, "modem.command_sets", NULL); - for (iter = capabilities; *iter; iter++) { + /* 'capabilites' may be NULL */ + for (iter = capabilities; iter && *iter; iter++) { if (!strcmp (*iter, "GSM-07.07")) { type_gsm = TRUE; break; |