Fixed crash in demo if no songs.
This commit is contained in:
@@ -207,8 +207,6 @@ static void BoostAppPri()
|
|||||||
if(version.dwMajorVersion >= 5)
|
if(version.dwMajorVersion >= 5)
|
||||||
pri = ABOVE_NORMAL_PRIORITY_CLASS;
|
pri = ABOVE_NORMAL_PRIORITY_CLASS;
|
||||||
|
|
||||||
#include <winbase.h>
|
|
||||||
|
|
||||||
/* Be sure to boost the app, not the thread, to make sure the
|
/* Be sure to boost the app, not the thread, to make sure the
|
||||||
* sound thread stays higher priority than the main thread. */
|
* sound thread stays higher priority than the main thread. */
|
||||||
SetPriorityClass(GetCurrentProcess(), pri);
|
SetPriorityClass(GetCurrentProcess(), pri);
|
||||||
|
|||||||
@@ -326,13 +326,7 @@ try_element_again:
|
|||||||
goto try_element_again;
|
goto try_element_again;
|
||||||
break;
|
break;
|
||||||
case IDABORT:
|
case IDABORT:
|
||||||
#endif
|
goto abort;
|
||||||
RageException::Throw( "Theme element '%s/%s' could not be found in '%s' or '%s'.",
|
|
||||||
sAssetCategory.GetString(),
|
|
||||||
sFileName.GetString(),
|
|
||||||
GetThemeDirFromName(m_sCurThemeName).GetString(),
|
|
||||||
GetThemeDirFromName(BASE_THEME_NAME).GetString() );
|
|
||||||
#ifdef _DEBUG
|
|
||||||
case IDIGNORE:
|
case IDIGNORE:
|
||||||
LOG->Warn(
|
LOG->Warn(
|
||||||
"Theme element '%s/%s' could not be found in '%s' or '%s'.",
|
"Theme element '%s/%s' could not be found in '%s' or '%s'.",
|
||||||
@@ -343,6 +337,15 @@ try_element_again:
|
|||||||
return GetPathTo( sAssetCategory, "_missing" );
|
return GetPathTo( sAssetCategory, "_missing" );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
abort:
|
||||||
|
RageException::Throw( "Theme element '%s/%s' could not be found in '%s' or '%s'.",
|
||||||
|
sAssetCategory.GetString(),
|
||||||
|
sFileName.GetString(),
|
||||||
|
GetThemeDirFromName(m_sCurThemeName).GetString(),
|
||||||
|
GetThemeDirFromName(BASE_THEME_NAME).GetString() );
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user