From a7bf9a0d0f4a86ba39d50c97cdc6dd5cafa2f1fb Mon Sep 17 00:00:00 2001 From: kmilner Date: Sun, 23 Jun 2024 15:58:17 -0700 Subject: [PATCH] fixed bug in cube association build logic --- .../rupForecastImpl/nshm23/NSHM23_InvConfigFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/opensha/sha/earthquake/rupForecastImpl/nshm23/NSHM23_InvConfigFactory.java b/src/main/java/org/opensha/sha/earthquake/rupForecastImpl/nshm23/NSHM23_InvConfigFactory.java index 1a0eb67f8..2f733e807 100644 --- a/src/main/java/org/opensha/sha/earthquake/rupForecastImpl/nshm23/NSHM23_InvConfigFactory.java +++ b/src/main/java/org/opensha/sha/earthquake/rupForecastImpl/nshm23/NSHM23_InvConfigFactory.java @@ -1128,9 +1128,10 @@ private static void doPreGridBuildHook(FaultSystemSolution sol, LogicTreeBranch< cubeAssociations = null; // force a rebuild } // build cube associations - if (cubeAssociations != null) + if (cubeAssociations == null) cubeAssociations = buildFaultCubeAssociations(rupSet, seisRegions); } + Preconditions.checkNotNull(cubeAssociations, "Cube associations is null"); // add to the rupture set if (addCubeAssoc) rupSet.addModule(cubeAssociations);