From 190d84a1d43c241bf0e178ce1bff6fe8e2cc6cd2 Mon Sep 17 00:00:00 2001 From: Axel Naumann <Axel.Naumann@cern.ch> Date: Tue, 22 Aug 2017 15:54:45 -0700 Subject: [PATCH] Coverity: handle dyncast failure. --- core/base/src/TApplication.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/base/src/TApplication.cxx b/core/base/src/TApplication.cxx index da62cd7e2bb..ac023fc6a2a 100644 --- a/core/base/src/TApplication.cxx +++ b/core/base/src/TApplication.cxx @@ -475,6 +475,11 @@ void TApplication::GetOptions(Int_t *argc, char **argv) if (fFiles) { for (auto f: *fFiles) { TObjString* file = dynamic_cast<TObjString*>(f); + if (!file) { + Error("GetOptions()", "Inconsistent file entry (not a TObjString)!"); + f->Dump(); + continue; + } if (file->TestBit(kExpression)) continue; -- GitLab