[GME-commit] GMESRC/GME/Gme GMEView.cpp,1.163,1.164

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Fri Apr 15 18:57:48 CDT 2005


Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv18000

Modified Files:
	GMEView.cpp 
Log Message:
Avoid console window crash in case when huge bitmap allocations fail.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: GMEView.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEView.cpp,v
retrieving revision 1.163
retrieving revision 1.164
diff -C2 -d -r1.163 -r1.164
*** GMEView.cpp	26 Jan 2005 17:28:27 -0000	1.163
--- GMEView.cpp	15 Apr 2005 17:57:46 -0000	1.164
***************
*** 534,537 ****
--- 534,546 ----
  	// TODO: Error checking
  	BOOL ret = pannBmp->CreateCompatibleBitmap(&tmpDC, target.Width(), target.Height());
+ 	if( !ret) // introd' by zolmol
+ 	{
+ 		if( pannDC)
+ 			delete pannDC;
+ 		if( pannBmp) 
+ 			delete pannBmp;
+ 
+ 		return;
+ 	}
  	ASSERT(ret);
  	pannDC->SelectObject(pannBmp);



More information about the GME-commit mailing list