Prevent crashes from an invalid noteskin being set.

This commit is contained in:
Kyzentun
2015-01-31 00:23:54 -07:00
parent 09eede311c
commit 8cde91eb2e
4 changed files with 22 additions and 2 deletions
+5 -1
View File
@@ -811,7 +811,11 @@ PlayerOptions& PlayerOptions::operator=(PlayerOptions const& other)
CPY_SPEED(fPlayerAutoPlay);
CPY_SPEED(fPerspectiveTilt);
CPY_SPEED(fSkew);
CPY(m_sNoteSkin);
if(!other.m_sNoteSkin.empty() &&
NOTESKIN->DoesNoteSkinExist(other.m_sNoteSkin))
{
CPY(m_sNoteSkin);
}
for( int i = 0; i < PlayerOptions::NUM_ACCELS; ++i )
{
CPY_SPEED(fAccels[i]);