From 0ecc4766e3e2bf29502f2a7e531f3021f8935187 Mon Sep 17 00:00:00 2001 From: Robert O'Bara Date: Mon, 7 Oct 2024 15:21:10 -0400 Subject: [PATCH] BUG: Adding a check for null Representation Proxies in applied method At least in CMB applications, we have encountered cases where the pipeline source does not have a representation proxy in the preferred view - this results in a crash in the applied method. This change checks to make sure the representation proxy is not null. --- Qt/ApplicationComponents/pqApplyBehavior.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Qt/ApplicationComponents/pqApplyBehavior.cxx b/Qt/ApplicationComponents/pqApplyBehavior.cxx index 0e4649299d8..ab29df762e5 100644 --- a/Qt/ApplicationComponents/pqApplyBehavior.cxx +++ b/Qt/ApplicationComponents/pqApplyBehavior.cxx @@ -266,6 +266,12 @@ void pqApplyBehavior::applied(pqPropertiesPanel* panel) Q_FOREACH (const pqInternals::PairType& pair, this->Internals->NewlyCreatedRepresentations) { vtkSMRepresentationProxy* reprProxy = pair.first; + // if there is no representation proxy - skip it + if (!reprProxy) + { + continue; + } + vtkSMViewProxy* viewProxy = pair.second; // If not scalar coloring, we make an attempt to color using -- GitLab