Update GalleryDatabase.kt

This commit is contained in:
Tibor Kaputa 2021-06-18 10:00:46 +02:00 committed by GitHub
parent dc72fc0de7
commit e603663f0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
} }