diff options
-rw-r--r-- | libpiano/src/xml.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index 66e937e..95e9756 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -388,17 +388,19 @@ PianoReturn_t PianoXmlParseStations (PianoHandle_t *ph, const char *xml) { } } /* set quickmix flags after all stations are read */ - curQuickMixId = quickMixIds; - while (*curQuickMixId != NULL) { - PianoStation_t *curStation = PianoFindStationById (ph->stations, - *curQuickMixId); - if (curStation != NULL) { - curStation->useQuickMix = 1; + if (quickMixIds != NULL) { + curQuickMixId = quickMixIds; + while (*curQuickMixId != NULL) { + PianoStation_t *curStation = PianoFindStationById (ph->stations, + *curQuickMixId); + if (curStation != NULL) { + curStation->useQuickMix = 1; + } + free (*curQuickMixId); + curQuickMixId++; } - free (*curQuickMixId); - curQuickMixId++; + free (quickMixIds); } - free (quickMixIds); xmlFreeDoc (doc); return PIANO_RET_OK; |