From: Guido de J. <gu...@us...> - 2004-06-29 07:57:29
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30015 Modified Files: Interface.cpp Log Message: just in case: prevent crash on null pointer Index: Interface.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Interface.cpp,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** Interface.cpp 25 May 2004 16:16:31 -0000 1.171 --- Interface.cpp 28 Jun 2004 20:27:59 -0000 1.172 *************** *** 318,326 **** strings->Open( fs, true ); printMessage( "Core", "Loading Palettes...\n", WHITE ); ! DataStream* bmppal256 = NULL, * bmppal16 = NULL; ! if (!IsAvailable( IE_BMP_CLASS_ID )) { ! printf( "No BMP Importer Available.\nTermination in Progress...\n" ); ! return GEM_ERROR; ! } bmppal256 = key->GetResource( "MPAL256\0", IE_BMP_CLASS_ID ); if (bmppal256) { --- 318,326 ---- strings->Open( fs, true ); printMessage( "Core", "Loading Palettes...\n", WHITE ); ! DataStream* bmppal256 = NULL, * bmppal16 = NULL; ! if (!IsAvailable( IE_BMP_CLASS_ID )) { ! printf( "No BMP Importer Available.\nTermination in Progress...\n" ); ! return GEM_ERROR; ! } bmppal256 = key->GetResource( "MPAL256\0", IE_BMP_CLASS_ID ); if (bmppal256) { *************** *** 331,347 **** } bmppal16 = key->GetResource( "MPALETTE", IE_BMP_CLASS_ID ); ! pal16 = ( ImageMgr * )this->GetInterface( IE_BMP_CLASS_ID ); ! pal16->Open( bmppal16, true ); printMessage( "Core", "Palettes Loaded\n", WHITE ); printMessage( "Core", "Loading Fonts...\n", WHITE ); ! if (!IsAvailable( IE_BAM_CLASS_ID )) { ! printf( "No BAM Importer Available.\nTermination in Progress...\n" ); ! return GEM_ERROR; ! } AnimationMgr* anim = ( AnimationMgr* ) GetInterface( IE_BAM_CLASS_ID ); ! if (!IsAvailable( IE_2DA_CLASS_ID )) { ! printf( "No 2DA Importer Available.\nTermination in Progress...\n" ); ! return GEM_ERROR; ! } int table = LoadTable( "fonts" ); if (table < 0) { --- 331,351 ---- } bmppal16 = key->GetResource( "MPALETTE", IE_BMP_CLASS_ID ); ! if (bmppal16) { ! pal16 = ( ImageMgr * )this->GetInterface( IE_BMP_CLASS_ID ); ! pal16->Open( bmppal16, true ); ! } else { ! pal16 = NULL; ! } printMessage( "Core", "Palettes Loaded\n", WHITE ); printMessage( "Core", "Loading Fonts...\n", WHITE ); ! if (!IsAvailable( IE_BAM_CLASS_ID )) { ! printf( "No BAM Importer Available.\nTermination in Progress...\n" ); ! return GEM_ERROR; ! } AnimationMgr* anim = ( AnimationMgr* ) GetInterface( IE_BAM_CLASS_ID ); ! if (!IsAvailable( IE_2DA_CLASS_ID )) { ! printf( "No 2DA Importer Available.\nTermination in Progress...\n" ); ! return GEM_ERROR; ! } int table = LoadTable( "fonts" ); if (table < 0) { |