Update GalleryDatabase.kt
This commit is contained in:
parent
dc72fc0de7
commit
e603663f0b
1 changed files with 2 additions and 4 deletions
|
@ -44,10 +44,8 @@ abstract class GalleryDatabase : RoomDatabase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun destroyInstance() {
|
fun destroyInstance() {
|
||||||
if (db != null) {
|
if (db?.isOpen == true) {
|
||||||
if(db!!.isOpen) {
|
db?.close()
|
||||||
db?.close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
db = null
|
db = null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue