From 5841aa35a3be364c12b13318588c3290c906259c Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Wed, 10 Feb 2010 08:50:25 +0000 Subject: [PATCH] Zero number of entries as well to avoid crashes on free --- Src/gui/menu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/gui/menu.cpp b/Src/gui/menu.cpp index ba64c55..e1e9dff 100644 --- a/Src/gui/menu.cpp +++ b/Src/gui/menu.cpp @@ -308,6 +308,7 @@ void Menu::setText(const char **messages, int *submenu_defaults) /* Empty messages are allowed */ this->p_submenus = NULL; this->pp_msgs = NULL; + this->n_entries = 0; if (!messages) return;