fix crash: make thumbnail BEFORE closing game

This commit is contained in:
Eric House 2013-11-27 07:06:14 -08:00
parent 83bd5f773c
commit 07a0e0ed93

View file

@ -746,14 +746,15 @@ public class GameUtils {
// update gi to reflect changes due to messages // update gi to reflect changes due to messages
XwJNI.game_getGi( gamePtr, gi ); XwJNI.game_getGi( gamePtr, gi );
saveGame( context, gamePtr, gi, lock, false );
summarizeAndClose( context, lock, gamePtr, gi, feedImpl );
if ( draw && XWPrefs.getThumbEnabled( context ) ) { if ( draw && XWPrefs.getThumbEnabled( context ) ) {
Bitmap bitmap = takeSnapshot( context, gamePtr, gi ); Bitmap bitmap = takeSnapshot( context, gamePtr, gi );
DBUtils.saveThumbnail( context, lock, bitmap ); DBUtils.saveThumbnail( context, lock, bitmap );
} }
saveGame( context, gamePtr, gi, lock, false );
summarizeAndClose( context, lock, gamePtr, gi, feedImpl );
int flags = setFromFeedImpl( feedImpl ); int flags = setFromFeedImpl( feedImpl );
if ( GameSummary.MSG_FLAGS_NONE != flags ) { if ( GameSummary.MSG_FLAGS_NONE != flags ) {
draw = true; draw = true;