From 395aa9b15f740aa3841d3b182ed5b2890390cc8f Mon Sep 17 00:00:00 2001 From: twinaphex <libretro@gmail.com> Date: Mon, 16 Feb 2015 00:34:55 +0100 Subject: [PATCH] (nbio) nbio_free - add early return in case handle is NULL --- nbio/nbio_stdio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nbio/nbio_stdio.c b/nbio/nbio_stdio.c index 101ff40bbb..9695fd9c6f 100644 --- a/nbio/nbio_stdio.c +++ b/nbio/nbio_stdio.c @@ -138,6 +138,8 @@ void* nbio_get_ptr(struct nbio_t* handle, size_t* len) void nbio_free(struct nbio_t* handle) { + if (!handle) + return; fclose(handle->f); free(handle->data); }