From e24003753569a4a10395eb97abb90e897ef67cdf Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 10 Jun 2009 15:12:58 +0000 Subject: [PATCH] - Bugfix: Fixed CTD when item could not be rendered in the Editor Toolbar - Fixed compilation error while compiling with disabled #define USE_VFS git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2997 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Editor/EditorItems.cpp | 2 +- Standard Gaming Platform/video.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Editor/EditorItems.cpp b/Editor/EditorItems.cpp index 7a6a2ecb..62b0e0d0 100644 --- a/Editor/EditorItems.cpp +++ b/Editor/EditorItems.cpp @@ -531,7 +531,7 @@ void InitEditorItemsInfo(UINT32 uiItemType) sOffset = hVObject->pETRLEObject[item->ubGraphicNum].sOffsetX; sStart = x + (60 - sWidth - sOffset*2) / 2; - if( sWidth ) + if( sWidth && sWidth > 0 ) { BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, item->ubGraphicNum, sStart, y+2, 0, FALSE ); } diff --git a/Standard Gaming Platform/video.cpp b/Standard Gaming Platform/video.cpp index 44fd386e..7dd8c822 100644 --- a/Standard Gaming Platform/video.cpp +++ b/Standard Gaming Platform/video.cpp @@ -2063,10 +2063,13 @@ void RefreshScreen(void *DummyVariable) DirectXAttempt ( ReturnCode, __LINE__, __FILE__ ); } } + +#ifdef USE_VFS catch(CBasicException& ex) { RETHROWEXCEPTION(L"",&ex); } +#endif // // Release temp surface