aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-30 08:30:56 +0200
committerMax Kellermann <max@duempel.org>2013-07-30 08:31:02 +0200
commitcd1bb2bafa2653e5d4c7c9abf6f464bcdec693c5 (patch)
tree73cf6bb9dabbb5b8de122add993a564ee4a62588 /src/Main.cxx
parenta9d2dc614496a8eee4269f4032457eb8a7fb6102 (diff)
downloadmpd-cd1bb2bafa2653e5d4c7c9abf6f464bcdec693c5.tar.gz
mpd-cd1bb2bafa2653e5d4c7c9abf6f464bcdec693c5.tar.xz
mpd-cd1bb2bafa2653e5d4c7c9abf6f464bcdec693c5.zip
Main: fix crash without state file
If no state file is configured, don't chek for state changes.
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index ff957c1ee..47160a575 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -348,7 +348,8 @@ idle_event_emitted(void)
if (flags != 0)
instance->client_list->IdleAdd(flags);
- if (flags & (IDLE_PLAYLIST|IDLE_PLAYER|IDLE_MIXER|IDLE_OUTPUT))
+ if (flags & (IDLE_PLAYLIST|IDLE_PLAYER|IDLE_MIXER|IDLE_OUTPUT) &&
+ state_file != nullptr)
state_file->CheckModified();
}