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() {
|
||||
if (db != null) {
|
||||
if(db!!.isOpen) {
|
||||
db?.close();
|
||||
}
|
||||
if (db?.isOpen == true) {
|
||||
db?.close()
|
||||
}
|
||||
db = null
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue