diff --git a/xwords4/linux/gtkaskm.c b/xwords4/linux/gtkaskm.c index c251eb8a0..aef7ef644 100644 --- a/xwords4/linux/gtkaskm.c +++ b/xwords4/linux/gtkaskm.c @@ -74,12 +74,13 @@ gtkaskm( const gchar* message, AskMInfo* infos, int nInfos ) gtk_main(); - if ( !state.cancelled ) { - for ( ii = 0; ii < nInfos; ++ii ) { + for ( ii = 0; ii < nInfos; ++ii ) { + AskMInfo* info = &infos[ii]; + if ( !state.cancelled ) { const gchar* txt = gtk_entry_get_text( GTK_ENTRY(fields[ii]) ); XP_LOGF( "%s: got text %s", __func__, txt ); - AskMInfo* info = &infos[ii]; - *info->result = g_strdup( txt ); + } else { + *info->result = NULL; } }