|
From: Terry T. <ter...@us...> - 2004-12-13 02:01:35
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11812/Frontier/Common/source Modified Files: smallicon.c Log Message: Prevent popup arrow icon 'SICN' resource from being purged when the bitmap is being copied, and memory is being stressed. Found by QC. Index: smallicon.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/smallicon.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** smallicon.c 31 Oct 2004 16:45:52 -0000 1.3 --- smallicon.c 13 Dec 2004 02:01:25 -0000 1.4 *************** *** 205,212 **** #ifdef MACVERSION Handle h; h = GetResource ('SICN', resnum); ! return (copyhandle (h, (Handle *) hbits)); #endif --- 205,220 ---- #ifdef MACVERSION Handle h; + boolean fl; + SInt8 hState; h = GetResource ('SICN', resnum); ! LoadResource(h); /*in case resource was purged*/ ! hState = HGetState(h); ! HNoPurge(h); /*in case resource is purgeable*/ ! fl = copyhandle (h, (Handle *) hbits); ! HSetState(h, hState); ! ! return (fl); #endif |