summaryrefslogtreecommitdiff
path: root/fluid/factory.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-12-01 16:53:21 +0100
committerMatthias Melcher <github@matthiasm.com>2023-12-01 16:53:27 +0100
commit96730f80cbc3b2d5aec2967a61f16bb2f02853e6 (patch)
tree2efb7ea0cf9f9f71aa7fa1838bd4b349ff9157d2 /fluid/factory.cxx
parentccc21d381a41620a9fb91870ab2a47ef9309d148 (diff)
Adds some possible NULL references and small fixes
Diffstat (limited to 'fluid/factory.cxx')
-rw-r--r--fluid/factory.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/fluid/factory.cxx b/fluid/factory.cxx
index a60717e30..59a358bce 100644
--- a/fluid/factory.cxx
+++ b/fluid/factory.cxx
@@ -1243,7 +1243,8 @@ Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
if (changed && t->is_a(ID_Menu_Item)) {
Fl_Type * tt = t->parent;
while (tt && !tt->is_a(ID_Menu_Manager_)) tt = tt->parent;
- ((Fl_Menu_Manager_Type*)tt)->build_menu();
+ if (tt)
+ ((Fl_Menu_Manager_Type*)tt)->build_menu();
}
}
if (t->is_true_widget() && !t->is_a(ID_Window)) {