Skip to content

Commit d453d70

Browse files
committed
[[ Bug 22087 ]] Prevent crash when setting the enabledTracks of player to empty
This patch fixes a crash when setting the enabledTracks of player to empty.
1 parent cf0f24b commit d453d70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/src/player-platform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ void MCPlayer::setenabledtracks(uindex_t p_count, uint32_t *p_tracks_id)
18771877
MCPlatformSetPlayerTrackProperty(m_platform_player, i, kMCPlatformPlayerTrackPropertyEnabled, kMCPlatformPropertyTypeBool, &t_enabled);
18781878
}
18791879

1880-
for (uindex_t i = 0; i < t_track_count; i++)
1880+
for (uindex_t i = 0; i < p_count; i++)
18811881
{
18821882
// If the list of enabledtracks we set contains 0 (empty), just skip it
18831883
if (p_tracks_id[i] == 0)

0 commit comments

Comments
 (0)