diff options
Diffstat (limited to '')
-rw-r--r-- | src/Main.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Main.cxx b/src/Main.cxx index 267979f31..ef5f46ee8 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -595,8 +595,11 @@ int mpd_main(int argc, char *argv[]) #ifdef ENABLE_DATABASE delete instance->update; - instance->database->Close(); - delete instance->database; + + if (instance->database != nullptr) { + instance->database->Close(); + delete instance->database; + } #endif #ifdef ENABLE_SQLITE |