summaryrefslogtreecommitdiff
path: root/minecctl/mc-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'minecctl/mc-commands.c')
-rw-r--r--minecctl/mc-commands.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/minecctl/mc-commands.c b/minecctl/mc-commands.c
index 133bfc0..7d44451 100644
--- a/minecctl/mc-commands.c
+++ b/minecctl/mc-commands.c
@@ -20,6 +20,10 @@ bool do_mc_pcount(struct cfg *cfg, unsigned *online, unsigned *max)
int fd;
server = server_get_default(cfg);
+ if (!server) {
+ error("failed to get default server");
+ return false;
+ }
fd = connect_any(&server->scfg.remotes, &saddr, &error);
if (fd < 0) {