Skip to content

Commit 3adf186

Browse files
committed
Fix unexpected exception when downloading reference peak CSV.
a std::function was being converted to a boost::function, which when the std::function was nullptr, is was creating a boost::function that tested non-empty.
1 parent 3e988b3 commit 3adf186

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ReferencePhotopeakDisplay.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ namespace
278278
}//switch( refinfo.m_source_type )
279279

280280

281-
boost::function<double(float)> att_fcn = refinfo.m_input.m_shielding_att;
281+
std::function<double( float )> att_fcn = refinfo.m_input.m_shielding_att;
282282

283283
try
284284
{
@@ -318,7 +318,9 @@ namespace
318318
assert( refinfo.m_input.m_shielding_an.empty() );
319319
assert( refinfo.m_input.m_shielding_ad.empty() );
320320
assert( refinfo.m_input.m_shielding_name.empty() );
321-
assert( refinfo.m_input.m_shielding_thickness.empty() );
321+
322+
// We may have a shielding thickness, but no material
323+
//assert( refinfo.m_input.m_shielding_thickness.empty() );
322324

323325
out << "Shielding,None" << eol_char;
324326
}//

0 commit comments

Comments
 (0)