Fixed a crash if no media configured