From 7ff31b59b0b2f6d2fd14401757908d0d049ed0d1 Mon Sep 17 00:00:00 2001 From: Wanne Date: Thu, 2 Jun 2011 20:52:24 +0000 Subject: [PATCH] BUGZILLA #492: Fixed CTD when switching from IMP page to another web page git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4469 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/IMP Color Choosing.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Laptop/IMP Color Choosing.cpp b/Laptop/IMP Color Choosing.cpp index a78ef0ae..3994130e 100644 --- a/Laptop/IMP Color Choosing.cpp +++ b/Laptop/IMP Color Choosing.cpp @@ -387,8 +387,6 @@ void EnterIMPColorChoice( void ) void RenderIMPColorChoice( void ) { - - //render the metal background graphic RenderProfileBackGround(); @@ -1090,9 +1088,20 @@ void BtnIMPBigBodyCallback(GUI_BUTTON *btn,INT32 reason) void IMPColorChoiceDisplayBoxes() { + VOBJECT_DESC VObjectDesc; //UINT16 usPosX, usPosY; HVOBJECT hImageHandle; + // WANNE: BUGZILLA #492: This fixed the CTD when switching from the IMP color choosing page to the Email and then back + // load the stats graphic and add it + VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE; + FilenameForBPP("LAPTOP\\SkillTraitSmallGreyIdent.sti", VObjectDesc.ImageFile); + if( !AddVideoObject(&VObjectDesc, &guiIST_GreyGoldBox4 ) ) + { + Assert( 0 ); + return; + } + // Stats GetVideoObject(&hImageHandle, guiIST_GreyGoldBox4 );