mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
don't try to save to read-only lock; check for non-existant games when
summarizing: together these fix crash when deleting after opening game whose remote partner has been deleted.
This commit is contained in:
parent
6719704117
commit
e040aa388b
2 changed files with 6 additions and 3 deletions
|
@ -256,7 +256,7 @@ public class DBUtils {
|
|||
db.close();
|
||||
}
|
||||
|
||||
if ( null == summary ) {
|
||||
if ( null == summary && lock.canWrite() ) {
|
||||
summary = GameUtils.summarize( context, lock );
|
||||
saveSummary( context, lock, summary );
|
||||
}
|
||||
|
|
|
@ -187,10 +187,13 @@ public class GameUtils {
|
|||
|
||||
public static GameSummary summarize( Context context, GameLock lock )
|
||||
{
|
||||
GameSummary result = null;
|
||||
CurGameInfo gi = new CurGameInfo( context );
|
||||
int gamePtr = loadMakeGame( context, gi, lock );
|
||||
|
||||
return summarizeAndClose( context, lock, gamePtr, gi );
|
||||
if ( 0 < gamePtr ) {
|
||||
result = summarizeAndClose( context, lock, gamePtr, gi );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static long dupeGame( Context context, long rowidIn )
|
||||
|
|
Loading…
Reference in a new issue