diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ui_act.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/ui_act.c b/src/ui_act.c index 8d9ac09..33d9edb 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -122,11 +122,18 @@ BarUiActCallback(BarUiActAddMusic) { BarUiActCallback(BarUiActBanSong) { PianoReturn_t pRet; WaitressReturn_t wRet; + PianoStation_t *realStation; assert (selStation != NULL); assert (selSong != NULL); + assert (selSong->stationId != NULL); - if (!BarTransformIfShared (app, selStation)) { + if ((realStation = PianoFindStationById (app->ph.stations, + selSong->stationId)) == NULL) { + assert (0); + return; + } + if (!BarTransformIfShared (app, realStation)) { return; } @@ -312,11 +319,18 @@ BarUiActCallback(BarUiActDebug) { BarUiActCallback(BarUiActLoveSong) { PianoReturn_t pRet; WaitressReturn_t wRet; + PianoStation_t *realStation; assert (selStation != NULL); assert (selSong != NULL); + assert (selSong->stationId != NULL); - if (!BarTransformIfShared (app, selStation)) { + if ((realStation = PianoFindStationById (app->ph.stations, + selSong->stationId)) == NULL) { + assert (0); + return; + } + if (!BarTransformIfShared (app, realStation)) { return; } |