From af00a17308fd17ea454021649a36f2f397a6da2b Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 19 Sep 2012 15:59:57 +0200 Subject: Fix segfault --- src/uca-plugin-manager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/uca-plugin-manager.c b/src/uca-plugin-manager.c index 7788678..bb27215 100644 --- a/src/uca-plugin-manager.c +++ b/src/uca-plugin-manager.c @@ -86,7 +86,9 @@ get_camera_names_from_directory (const gchar *path) if (g_match_info_matches (match_info)) { gchar *word = g_match_info_fetch (match_info, 1); - result = g_list_append (result, word); + + if (word != NULL) + result = g_list_append (result, word); } name = g_dir_read_name (dir); @@ -100,7 +102,7 @@ GList * uca_plugin_manager_get_available_cameras (UcaPluginManager *manager) { UcaPluginManagerPrivate *priv; - GList *camera_names; + GList *camera_names = NULL; g_return_val_if_fail (UCA_IS_PLUGIN_MANAGER (manager), NULL); -- cgit v1.2.3