diff options
Diffstat (limited to 'src/libqmi-glib/qmi-utils.c')
-rw-r--r-- | src/libqmi-glib/qmi-utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libqmi-glib/qmi-utils.c b/src/libqmi-glib/qmi-utils.c index 29e5f22..5d399a6 100644 --- a/src/libqmi-glib/qmi-utils.c +++ b/src/libqmi-glib/qmi-utils.c @@ -743,8 +743,10 @@ __qmi_utils_get_driver (const gchar *cdc_wdm_path) path = canonicalize_file_name (tmp); g_free (tmp); - if (g_file_test (path, G_FILE_TEST_EXISTS)) - driver = g_path_get_basename (path); + if (!path) + continue; + + driver = g_path_get_basename (path); g_free (path); } |