summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc3f209)
raw | patch | inline | side by side (parent: cc3f209)
author | Max Kellermann <max@duempel.org> | |
Thu, 1 Oct 2009 21:58:27 +0000 (23:58 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 1 Oct 2009 21:58:27 +0000 (23:58 +0200) |
src/screen_file.c | patch | blob | history |
diff --git a/src/screen_file.c b/src/screen_file.c
index b36c265031ea35279f7b14c88293d2159b0eeca2..116d32937bd31337986096b60ea7a3e09505352f 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
segmentation fault in the current implementation */
return false;
- case CMD_DELETE:
- handle_delete(c);
- screen_file_repaint();
- break;
- case CMD_SAVE_PLAYLIST:
- handle_save(c);
- break;
case CMD_SCREEN_UPDATE:
screen_file_reload(c);
#ifndef NCMPC_MINI
screen_file_repaint();
return false;
- case CMD_DB_UPDATE:
- if (c->status == NULL)
- return true;
-
- screen_database_update(c, current_path);
- return true;
-
default:
break;
}
return true;
}
+ if (!mpdclient_is_connected(c))
+ return false;
+
+ switch(cmd) {
+ case CMD_DELETE:
+ handle_delete(c);
+ screen_file_repaint();
+ break;
+
+ case CMD_SAVE_PLAYLIST:
+ handle_save(c);
+ break;
+
+ case CMD_DB_UPDATE:
+ screen_database_update(c, current_path);
+ return true;
+
+ default:
+ break;
+ }
+
return false;
}