summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-02-11 15:46:46 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-02-11 15:46:46 +0100
commit8ea4b5b5b10e5b68a79ab651820dcbc4c4d88207 (patch)
treedece548fc7e8040602fe54e54a10f00d97b7f10d /fluid
parent924289a40c2f112772e0b44325ba2297b2e07a35 (diff)
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).
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Function_Type.cxx2
1 files changed, 1 insertions, 1 deletions
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;
}