mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-11-16 07:48:07 +01:00
fix shutdown panic by disposing fonts
This commit is contained in:
parent
8b34f57bf9
commit
cf271c4411
1 changed files with 10 additions and 0 deletions
|
@ -102,6 +102,7 @@ typedef struct SymDrawCtxt {
|
||||||
|
|
||||||
XP_U16 iTrayOwner;
|
XP_U16 iTrayOwner;
|
||||||
XP_Bool iTrayHasFocus;
|
XP_Bool iTrayHasFocus;
|
||||||
|
XP_Bool iAllFontsSame;
|
||||||
TRgb colors[COLOR_NCOLORS];
|
TRgb colors[COLOR_NCOLORS];
|
||||||
|
|
||||||
MPSLOT
|
MPSLOT
|
||||||
|
@ -181,6 +182,14 @@ sym_draw_destroyCtxt( DrawCtx* p_dctx )
|
||||||
SymDrawCtxt* sctx = (SymDrawCtxt*)p_dctx;
|
SymDrawCtxt* sctx = (SymDrawCtxt*)p_dctx;
|
||||||
XP_LOGF( "freeing draw ctxt" );
|
XP_LOGF( "freeing draw ctxt" );
|
||||||
|
|
||||||
|
CWsScreenDevice* sdev = sctx->iCoeEnv->ScreenDevice();
|
||||||
|
sdev->ReleaseFont( sctx->iTileFaceFont );
|
||||||
|
if ( ! sctx->iAllFontsSame ) {
|
||||||
|
sdev->ReleaseFont( sctx->iTileValueFont );
|
||||||
|
sdev->ReleaseFont( sctx->iBoardFont );
|
||||||
|
sdev->ReleaseFont( sctx->iScoreFont );
|
||||||
|
}
|
||||||
|
|
||||||
delete sctx->iRightArrow;
|
delete sctx->iRightArrow;
|
||||||
delete sctx->iDownArrow;
|
delete sctx->iDownArrow;
|
||||||
delete sctx->iStar;
|
delete sctx->iStar;
|
||||||
|
@ -726,6 +735,7 @@ figureFonts( SymDrawCtxt* sctx )
|
||||||
sctx->iTileValueFont = sctx->iTileFaceFont;
|
sctx->iTileValueFont = sctx->iTileFaceFont;
|
||||||
sctx->iBoardFont = sctx->iTileFaceFont;
|
sctx->iBoardFont = sctx->iTileFaceFont;
|
||||||
sctx->iScoreFont = sctx->iTileFaceFont;
|
sctx->iScoreFont = sctx->iTileFaceFont;
|
||||||
|
sctx->iAllFontsSame = XP_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined SERIES_60
|
#elif defined SERIES_60
|
||||||
|
|
Loading…
Reference in a new issue