projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'topic-tilesize-cleanup'
[rocksndiamonds.git]
/
src
/
libgame
/
gadgets.c
diff --git
a/src/libgame/gadgets.c
b/src/libgame/gadgets.c
index 3781aeb416c1497163820c819992baad3fb222bd..8b99078ebfd62d3963eaa65777eee631192b0ccc 100644
(file)
--- a/
src/libgame/gadgets.c
+++ b/
src/libgame/gadgets.c
@@
-1263,6
+1263,9
@@
void FreeGadget(struct GadgetInfo *gi)
{
struct GadgetInfo *gi_previous = gadget_list_first_entry;
+ if (gi == NULL)
+ return;
+
/* prevent "last_info_gi" from pointing to memory that will be freed */
if (last_info_gi == gi)
last_info_gi = NULL;