From 2baaf818a682616f9e8d4d5547ce40391ff5879c Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 27 Dec 2014 16:15:48 +0100 Subject: [PATCH] Add a check --- qcsrc/menu/xonotic/soundlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/menu/xonotic/soundlist.c b/qcsrc/menu/xonotic/soundlist.c index f1b4aa300..e45e486dc 100644 --- a/qcsrc/menu/xonotic/soundlist.c +++ b/qcsrc/menu/xonotic/soundlist.c @@ -83,7 +83,8 @@ void XonoticSoundList_getSounds(entity me) void XonoticSoundList_destroy(entity me) { - search_end(me.listSound); + if(me.listSound >= 0) + search_end(me.listSound); } void XonoticSoundList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) -- 2.39.2