From 8ea4b5b5b10e5b68a79ab651820dcbc4c4d88207 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 11 Feb 2020 15:46:46 +0100 Subject: Fix static analyzer errors and warnings Fix several bugs found by scan-build (more to come). https://clang-analyzer.llvm.org/scan-build.html See also current travis-ci build log with static analyzer, e.g. https://travis-ci.com/fltk/fltk/jobs/285426415 (link may become invalid in the future). --- fluid/Fl_Function_Type.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fluid') diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index 5d002796d..594a526a9 100644 --- a/fluid/Fl_Function_Type.cxx +++ b/fluid/Fl_Function_Type.cxx @@ -394,7 +394,7 @@ void Fl_Function_Type::write_code1() { } } - if (havewidgets && !child->name()) write_c(" %s* w;\n", subclassname(child)); + if (havewidgets && child && !child->name()) write_c(" %s* w;\n", subclassname(child)); indentation += 2; } -- cgit v1.2.3