mirror of
https://github.com/UberGames/RPG-X2.git
synced 2024-11-15 01:11:46 +00:00
fixed crash when accessing emote menu on Windows
This commit is contained in:
parent
bbdc52c075
commit
a1b782613a
3 changed files with 3 additions and 3 deletions
Binary file not shown.
BIN
stefgame.suo
BIN
stefgame.suo
Binary file not shown.
|
@ -365,7 +365,7 @@ static void PlayerEmotes_FillEmotesArray( int emoteCategory ) {
|
|||
for ( i = 0; i < bg_numEmotes; i++ ) {
|
||||
//TiM: Make sure we don't include emote stubs. No point
|
||||
emote = &bg_emoteList[ i ];
|
||||
if ( !emote || s_playerEmotes.playerInfo.animations[ emote->enumName ].numFrames < 0 || !emote->name[0] )
|
||||
if ( !emote || (emote->enumName >= 0 && emote->enumName < MAX_ANIMATIONS && s_playerEmotes.playerInfo.animations[ emote->enumName ].numFrames < 0) || !emote->name[0] )
|
||||
continue;
|
||||
|
||||
s_playerEmotes.mainEmotesList[ s_playerEmotes.numEmotes ] = i;
|
||||
|
@ -409,7 +409,7 @@ static void PlayerEmotes_FillEmotesArray( int emoteCategory ) {
|
|||
|
||||
//TiM: Make sure we don't include emote stubs. No point
|
||||
emote = &bg_emoteList[ emoteNum ];
|
||||
if ( !emote || s_playerEmotes.playerInfo.animations[ emote->enumName ].numFrames < 0 )
|
||||
if ( !emote || (emote->enumName >= 0 && emote->enumName < MAX_ANIMATIONS && s_playerEmotes.playerInfo.animations[ emote->enumName ].numFrames < 0) )
|
||||
continue;
|
||||
|
||||
//add to the list
|
||||
|
@ -463,7 +463,7 @@ static void PlayerEmotes_FillEmotesArray( int emoteCategory ) {
|
|||
for ( i = 0; i < bg_numEmotes; i++ ) {
|
||||
//TiM: Make sure we don't include emote stubs. No point
|
||||
emote = &bg_emoteList[ i ];
|
||||
if ( !emote || s_playerEmotes.playerInfo.animations[ emote->enumName ].numFrames < 0 )
|
||||
if ( !emote || (emote->enumName >= 0 && emote->enumName < MAX_ANIMATIONS && s_playerEmotes.playerInfo.animations[ emote->enumName ].numFrames < 0) )
|
||||
continue;
|
||||
|
||||
if ( bg_emoteList[i].emoteType == emoteIndex ) {
|
||||
|
|
Loading…
Reference in a new issue