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
This commit is contained in:
Matthias Melcher 2005-08-29 19:57:34 +00:00
parent 6ae2a95a8c
commit 03654fb48d

View File

@ -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);
}
}