diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt index b29066036..2436e87bd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt @@ -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 }