From 17ae0f72dfc847c870533574aa55d40efd45a05a Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 13 Feb 2011 21:19:20 +0100 Subject: [PATCH] Do not try to poll when we've disconnected. --- netplay.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netplay.c b/netplay.c index 9db2df1c7d..a96feed9f3 100644 --- a/netplay.c +++ b/netplay.c @@ -272,6 +272,9 @@ bool netplay_is_port(netplay_t *handle, bool port, unsigned index) bool netplay_poll(netplay_t *handle) { + if (!handle->has_connection) + return false; + uint16_t state = 0; snes_input_state_t cb = handle->cbs.state_cb; for (int i = 0; i <= 11; i++)