mirror of
https://github.com/polybar/polybar.git
synced 2025-02-24 15:58:22 -05:00
fix(mpd): Safety check
This commit is contained in:
parent
78823fda6d
commit
f25d26fbd9
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ MpdModule::~MpdModule()
|
||||||
{
|
{
|
||||||
std::lock_guard<concurrency::SpinLock> lck(this->update_lock);
|
std::lock_guard<concurrency::SpinLock> lck(this->update_lock);
|
||||||
{
|
{
|
||||||
if (this->mpd->connected()) {
|
if (this->mpd && this->mpd->connected()) {
|
||||||
try {
|
try {
|
||||||
this->mpd->disconnect();
|
this->mpd->disconnect();
|
||||||
} catch (mpd::Exception &e) {
|
} catch (mpd::Exception &e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue