am 1533aed6: Merge change Ib1dd3235 into eclair-mr2

Merge commit '1533aed6d90b776c815bae819d1413064aa1f0d9' into eclair-mr2-plus-aosp

* commit '1533aed6d90b776c815bae819d1413064aa1f0d9':
  fix NPE. don't release an already released compiledSql obj
This commit is contained in:
Vasu Nori
2009-12-01 17:08:38 -08:00
committed by Android Git Automerger

View File

@@ -76,7 +76,7 @@ public abstract class SQLiteProgram extends SQLiteClosable {
@Override
protected void onAllReferencesReleased() {
// release the compiled sql statement used by me if it is NOT in cache
if (!myCompiledSqlIsInCache) {
if (!myCompiledSqlIsInCache && compiledSql != null) {
compiledSql.releaseSqlStatement();
compiledSql = null; // so that GC doesn't call finalize() on it
}
@@ -87,7 +87,7 @@ public abstract class SQLiteProgram extends SQLiteClosable {
@Override
protected void onAllReferencesReleasedFromContainer() {
// release the compiled sql statement used by me if it is NOT in cache
if (!myCompiledSqlIsInCache) {
if (!myCompiledSqlIsInCache && compiledSql != null) {
compiledSql.releaseSqlStatement();
compiledSql = null; // so that GC doesn't call finalize() on it
}