From: Holger Schemel Date: Wed, 1 Nov 2017 21:14:44 +0000 (+0100) Subject: added null pointer check to gadget function X-Git-Tag: 4.1.0.0~78 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e9b47ffa7a91cd2a2317b3d5db85165b64e2f74c;p=rocksndiamonds.git added null pointer check to gadget function --- diff --git a/src/libgame/gadgets.c b/src/libgame/gadgets.c index 668641bd..a797c754 100644 --- a/src/libgame/gadgets.c +++ b/src/libgame/gadgets.c @@ -1481,7 +1481,7 @@ static boolean insideSelectboxArea(struct GadgetInfo *gi, int mx, int my) void ClickOnGadget(struct GadgetInfo *gi, int button) { - if (!gi->mapped) + if (gi == NULL || gi->deactivated || !gi->mapped) return; /* simulate releasing mouse button over last gadget, if still pressed */