]> git.sesse.net Git - mlt/commitdiff
Fix crash when LADSPA_PATH is empty string.
authorDan Dennedy <dan@dennedy.org>
Wed, 16 Oct 2013 16:32:02 +0000 (09:32 -0700)
committerDan Dennedy <dan@dennedy.org>
Wed, 16 Oct 2013 16:32:02 +0000 (09:32 -0700)
src/modules/jackrack/plugin_mgr.c

index 92ea74a9eac82e3d0e2bbf28c1d509ac2404ae1a..386cb25aca85d0e34f30ca30a86b4ca1b1341a75 100644 (file)
@@ -237,10 +237,8 @@ plugin_mgr_get_path_plugins (plugin_mgr_t * plugin_mgr)
     ladspa_path = g_strdup ("/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/lib64/ladspa");
 #endif
   
-  dir = strtok (ladspa_path, ":");
-  do
+  for (dir = strtok (ladspa_path, ":"); dir; dir = strtok (NULL, ":"))
     plugin_mgr_get_dir_plugins (plugin_mgr, dir);
-  while ((dir = strtok (NULL, ":")));
 
   g_free (ladspa_path);
 }