[MediaController] Fix CustomCommand crash issue (#5652)