mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
check that there's a form up before calling FrmCustomAlert (when
warning about missing dict)
This commit is contained in:
parent
efc1800f87
commit
0433e3cc66
1 changed files with 8 additions and 5 deletions
|
@ -541,10 +541,14 @@ saveGamePrefs( /*PalmAppGlobals* globals, */XWStreamCtxt* stream )
|
||||||
static void
|
static void
|
||||||
reportMissingDict( PalmAppGlobals* globals, XP_UCHAR* name )
|
reportMissingDict( PalmAppGlobals* globals, XP_UCHAR* name )
|
||||||
{
|
{
|
||||||
|
/* FrmCustomAlert crashes on some OS versions when there's no form under
|
||||||
|
it to "return" to. */
|
||||||
|
if ( FrmGetActiveForm() != NULL ) {
|
||||||
XP_UCHAR buf[48];
|
XP_UCHAR buf[48];
|
||||||
XP_UCHAR* str = getResString( globals, STRS_CANNOT_FIND_DICT );
|
XP_UCHAR* str = getResString( globals, STRS_CANNOT_FIND_DICT );
|
||||||
StrPrintF( buf, str, name );
|
StrPrintF( buf, str, name );
|
||||||
(void)FrmCustomAlert( XW_ERROR_ALERT_ID, (const char*)buf, " ", " " );
|
(void)FrmCustomAlert( XW_ERROR_ALERT_ID, (const char*)buf, " ", " " );
|
||||||
|
}
|
||||||
} /* reportMissingDict */
|
} /* reportMissingDict */
|
||||||
|
|
||||||
static Boolean
|
static Boolean
|
||||||
|
@ -577,7 +581,6 @@ loadCurrentGame( PalmAppGlobals* globals, XP_U16 gIndex,
|
||||||
success = dict != NULL;
|
success = dict != NULL;
|
||||||
|
|
||||||
if ( !success ) {
|
if ( !success ) {
|
||||||
/* putting up a dlog here used to crash */
|
|
||||||
reportMissingDict( globals, name );
|
reportMissingDict( globals, name );
|
||||||
XP_FREE( globals->mpool, name );
|
XP_FREE( globals->mpool, name );
|
||||||
beep();
|
beep();
|
||||||
|
|
Loading…
Add table
Reference in a new issue