summaryrefslogtreecommitdiff
path: root/fluid/Fl_Menu_Type.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-08-29 19:57:34 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-08-29 19:57:34 +0000
commit03654fb48d191acb379cb3c19ab9e576eb5cbef2 (patch)
tree06d3d66c260c967256b87b8bb091e36cfa0220c4 /fluid/Fl_Menu_Type.cxx
parent6ae2a95a8c8aec3ed820c0d02590adf01b567c33 (diff)
The newly introduce Fl_Widget_Class_Type in Fluid would cause a null pointer when a Menu Item was trying to find the top parent widget.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Menu_Type.cxx')
-rw-r--r--fluid/Fl_Menu_Type.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx
index 72b5005eb..9beaa62b2 100644
--- a/fluid/Fl_Menu_Type.cxx
+++ b/fluid/Fl_Menu_Type.cxx
@@ -211,7 +211,7 @@ void Fl_Menu_Item_Type::write_static() {
write_c("void %s::%s(Fl_Menu_* o, %s v) {\n", k, cn, ut);
write_c(" ((%s*)(o->", k);
Fl_Type* t = parent; while (t->is_menu_item()) t = t->parent;
- for (t = t->parent; t->is_widget(); t = t->parent) write_c("parent()->");
+ for (t = t->parent; t && t->is_widget() && !is_class(); t = t->parent) write_c("parent()->");
write_c("user_data()))->%s_i(o,v);\n}\n", cn);
}
}