mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +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
|
||||
reportMissingDict( PalmAppGlobals* globals, XP_UCHAR* name )
|
||||
{
|
||||
XP_UCHAR buf[48];
|
||||
XP_UCHAR* str = getResString( globals, STRS_CANNOT_FIND_DICT );
|
||||
StrPrintF( buf, str, name );
|
||||
(void)FrmCustomAlert( XW_ERROR_ALERT_ID, (const char*)buf, " ", " " );
|
||||
/* 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* str = getResString( globals, STRS_CANNOT_FIND_DICT );
|
||||
StrPrintF( buf, str, name );
|
||||
(void)FrmCustomAlert( XW_ERROR_ALERT_ID, (const char*)buf, " ", " " );
|
||||
}
|
||||
} /* reportMissingDict */
|
||||
|
||||
static Boolean
|
||||
|
@ -577,7 +581,6 @@ loadCurrentGame( PalmAppGlobals* globals, XP_U16 gIndex,
|
|||
success = dict != NULL;
|
||||
|
||||
if ( !success ) {
|
||||
/* putting up a dlog here used to crash */
|
||||
reportMissingDict( globals, name );
|
||||
XP_FREE( globals->mpool, name );
|
||||
beep();
|
||||
|
|
Loading…
Reference in a new issue