summaryrefslogtreecommitdiff
path: root/src/Fl_Menu_add.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Menu_add.cxx')
-rw-r--r--src/Fl_Menu_add.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_Menu_add.cxx b/src/Fl_Menu_add.cxx
index 08a9153d9..1519602a4 100644
--- a/src/Fl_Menu_add.cxx
+++ b/src/Fl_Menu_add.cxx
@@ -498,7 +498,8 @@ void Fl_Menu_::remove(int i) {
const Fl_Menu_Item* next_item = item->next();
// delete the text only if all items were created with add():
if (alloc > 1) {
- for (Fl_Menu_Item* m = item; m < next_item; m++)
+ Fl_Menu_Item *m;
+ for (m = item; m < next_item; m++)
if (m->text) free((void*)(m->text));
}
// MRS: "n" is the menu size(), which includes the trailing NULL entry...