stepmania/stepmania — pull request #277 by kyzentun (2014-08-30 03:09:02+00:00)
Title: WheelItemBase:IsLoaded

I encountered a segfault in a theme caused by the theme calling functions on a wheel item that was not yet loaded.

This theme seg faulted because the music wheel set the current song to null on loading because the current song was too long for the stages remaining.
The theme's behavior when the current song is null it to check the wheel item that has focus and use its type to set a piece of text, which is perfectly reasonable.
The problem is, the music wheel sets the song to null before the wheel items are built, so checking the type caused a seg fault.

This PR fixes the segfault problem by making unloaded wheel items emit an error when used and adding a function that can be used to check their status.