mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix: VS2010 debug builds crashed while reading InteractiveActions.xml
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8284 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -116,14 +116,18 @@ interactiveactionsEndElementHandle( void *userData, const XML_Char *name )
|
||||
// for whatever reasons the game crashes in VS2008 Release builds when copying over the tilevector
|
||||
// this seems odd, as this works just fine in VS2010 and VS2013, and also works in VS205 debug builds
|
||||
// for now, copy over the content by hand
|
||||
pData->curArray[pData->curIndex].tileindexvector = tileindexvector;
|
||||
pData->curArray[pData->curIndex].gridnovector = gridnovector;
|
||||
// check if the vector is empty because assigning an empty vector will crash VS2010 debug builds!
|
||||
if ( !tileindexvector.empty() )
|
||||
{
|
||||
pData->curArray[pData->curIndex].tileindexvector = tileindexvector;
|
||||
tileindexvector.clear( );
|
||||
}
|
||||
|
||||
tileindexvector.clear( );
|
||||
tileindexvector.resize( 0 );
|
||||
|
||||
gridnovector.clear();
|
||||
gridnovector.resize( 0 );
|
||||
if ( !gridnovector.empty() )
|
||||
{
|
||||
pData->curArray[pData->curIndex].gridnovector = gridnovector;
|
||||
gridnovector.clear();
|
||||
}
|
||||
}
|
||||
|
||||
pData->curIndex++;
|
||||
|
||||
Reference in New Issue
Block a user