audio_route: check if subpath name is valid before trying to add it

Change-Id: I38d38c14d68e0fb25af188661cba750b7cac8f99
diff --git a/audio_route/audio_route.c b/audio_route/audio_route.c
index bd5c112..bf72640 100644
--- a/audio_route/audio_route.c
+++ b/audio_route/audio_route.c
@@ -478,7 +478,11 @@
             } else {
                 /* nested path */
                 struct mixer_path *sub_path = path_get_by_name(ar, attr_name);
-                path_add_path(ar, state->path, sub_path);
+                if (!sub_path) {
+                    ALOGE("unable to find sub path '%s'", attr_name);
+                } else {
+                    path_add_path(ar, state->path, sub_path);
+                }
             }
         }
     }