File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
packages/seacas/libraries/ioss/src/cgns Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -1146,16 +1146,18 @@ namespace Iocgns {
11461146 int idx = 0 ;
11471147 for (const auto & sb : blocks ) {
11481148 unsigned assem_hash = assem_ids [idx ++ ];
1149- std ::string name = assembly_hash_map [assem_hash ];
1150- auto * assembly = get_region ()-> get_assembly (name );
1151- assert (assembly != nullptr );
1152- if (!sb -> property_exists ("assembly" )) {
1153- assembly -> add (sb );
1154- Ioss ::StructuredBlock * new_sb = const_cast < Ioss ::StructuredBlock * > (sb );
1155- new_sb -> property_add (Ioss ::Property ("assembly" , assembly -> name ()));
1156- }
1157- SMART_ASSERT (sb -> get_property ("assembly" ).get_string () == assembly -> name ())
1158- (sb -> get_property ("assembly" ).get_string ())(assembly -> name ());
1149+ if (assem_hash > 0 ) {
1150+ std ::string name = assembly_hash_map [assem_hash ];
1151+ auto * assembly = get_region ()-> get_assembly (name );
1152+ assert (assembly != nullptr );
1153+ if (!sb -> property_exists ("assembly" )) {
1154+ assembly -> add (sb );
1155+ Ioss ::StructuredBlock * new_sb = const_cast < Ioss ::StructuredBlock * > (sb );
1156+ new_sb -> property_add (Ioss ::Property ("assembly" , assembly -> name ()));
1157+ }
1158+ SMART_ASSERT (sb -> get_property ("assembly" ).get_string () == assembly -> name ())
1159+ (sb -> get_property ("assembly" ).get_string ())(assembly -> name ());
1160+ }
11591161 }
11601162 }
11611163#endif
You can’t perform that action at this time.
0 commit comments