diff --git a/src/modules/mpd.cpp b/src/modules/mpd.cpp index df67cc73..873b39f9 100644 --- a/src/modules/mpd.cpp +++ b/src/modules/mpd.cpp @@ -77,7 +77,7 @@ MpdModule::~MpdModule() { std::lock_guard lck(this->update_lock); { - if (this->mpd->connected()) { + if (this->mpd && this->mpd->connected()) { try { this->mpd->disconnect(); } catch (mpd::Exception &e) {