diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8ef8c5d4ff..68a5472ed9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-26 12:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/fm.c + ! fixed stupid typo I made just before recent commit which caused + GPF when not all mspaces where initialized + 2009-11-26 02:27 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_slots.cpp * contrib/hbqt/hbqt_slots.h diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index c56ebc73af..443039a960 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -421,7 +421,7 @@ static void * hb_mspace_update( void * pAlloc, int iCount ) { PHB_MSPACE pm = ( PHB_MSPACE ) pAlloc; - if( pm->count > iCount ) + if( pm && pm->count > iCount ) { pAlloc = ( void * ) hb_mspace_alloc(); pm->count--; @@ -518,10 +518,13 @@ void hb_xclean( void ) for( i = imax = icount = 0; i < HB_MSPACE_COUNT; ++i ) { - icount += s_mspool[ i ].count; - if( imax < s_mspool[ i ].count ) - imax = s_mspool[ i ].count; - mspace_trim( s_mspool[ i ].ms, 0 ); + if( s_mspool[ i ].ms ) + { + icount += s_mspool[ i ].count; + if( imax < s_mspool[ i ].count ) + imax = s_mspool[ i ].count; + mspace_trim( s_mspool[ i ].ms, 0 ); + } } icount = ( icount + HB_MSPACE_COUNT - 1 ) / HB_MSPACE_COUNT; if( imax > icount )