1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-25 13:55:47 -05:00

fix(mpd): Safety check

This commit is contained in:
Michael Carlberg 2016-06-27 22:55:52 +02:00
parent 78823fda6d
commit f25d26fbd9

View file

@ -77,7 +77,7 @@ MpdModule::~MpdModule()
{
std::lock_guard<concurrency::SpinLock> lck(this->update_lock);
{
if (this->mpd->connected()) {
if (this->mpd && this->mpd->connected()) {
try {
this->mpd->disconnect();
} catch (mpd::Exception &e) {