Check pointer before derefencing (fixes #2161)
current_track may be uninialized when this function is called at load-time
This commit is contained in:
parent
ba3c6ec3da
commit
ee5a6e03f4
1 changed files with 1 additions and 1 deletions
|
@ -714,7 +714,7 @@ void play_music_config(const config& music_node, int i)
|
|||
current_track = *iter;
|
||||
current_track_index = iter - current_track_list.begin();
|
||||
play_music();
|
||||
} else if(!track.append()) { // Make sure the current track is finished
|
||||
} else if(!track.append() && current_track) { // Make sure the current track is finished
|
||||
current_track->set_play_once(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue