From 03654fb48d191acb379cb3c19ab9e576eb5cbef2 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 29 Aug 2005 19:57:34 +0000 Subject: 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 --- fluid/Fl_Menu_Type.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- cgit v1.2.3