From d47eb56ad7d94d49e6f96a624dec3cb2e66c6281 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 10 Apr 2012 00:59:03 +0000 Subject: [PATCH] 2012-04-10 02:57 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/gtwvg.c ! HB_GTINFOEX(): fixed using object after freeing it ! renamed HB_GTINFOEX() -> WVG_GTINFOEX() to avoid occupying Harbour core namespace in non-core component. It also uses raw pointer to access internals. (if such functionality is to be ever implemented in core, it should probably be done by extending existing HB_GTINFO()) ; INCOMPATIBLE. Update your function calls according to above. --- harbour/ChangeLog | 10 ++++++++++ harbour/contrib/gtwvg/gtwvg.c | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index cfc949d000..d52747c670 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2012-04-10 02:57 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/gtwvg/gtwvg.c + ! HB_GTINFOEX(): fixed using object after freeing it + ! renamed HB_GTINFOEX() -> WVG_GTINFOEX() to avoid occupying + Harbour core namespace in non-core component. It also uses + raw pointer to access internals. + (if such functionality is to be ever implemented in core, + it should probably be done by extending existing HB_GTINFO()) + ; INCOMPATIBLE. Update your function calls according to above. + 2012-04-10 02:41 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/wvgclass.prg * contrib/gtwvg/wvgpaint.prg diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index dec0debb4d..e154446933 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -4703,7 +4703,7 @@ PHB_GTWVT hb_wvt_gtGetWVT( void ) /*----------------------------------------------------------------------*/ -HB_FUNC( HB_GTINFOEX ) +HB_FUNC( WVG_GTINFOEX ) { if( HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) ) { @@ -4717,8 +4717,8 @@ HB_FUNC( HB_GTINFOEX ) gtInfo.pNewVal2 = hb_param( 4, HB_IT_ANY ); gtInfo.pResult = NULL; - hb_gt_BaseFree( pGT ); HB_GTSELF_INFO( pGT, hb_parni( 2 ), >Info ); + hb_gt_BaseFree( pGT ); if( gtInfo.pResult ) hb_itemReturnRelease( gtInfo.pResult );