We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a3fc53 commit 50f808bCopy full SHA for 50f808b
include/openPMD/IO/HDF5/HDF5Auxiliary.hpp
@@ -28,6 +28,7 @@
28
#include <hdf5.h>
29
30
#include <stack>
31
+#include <iostream>
32
33
34
namespace openPMD
@@ -253,7 +254,13 @@ concrete_h5_file_position(Writable* w)
253
254
std::string pos;
255
while( !hierarchy.empty() )
256
{
- pos += std::dynamic_pointer_cast< HDF5FilePosition >(hierarchy.top()->abstractFilePosition)->location;
257
+ auto afp = hierarchy.top()->abstractFilePosition;
258
+
259
+ auto afp_h5 = std::dynamic_pointer_cast< HDF5FilePosition >(afp);
260
+ if( afp_h5 == nullptr )
261
+ std::cerr << "WARNING: invalid file position in writable stack!" << std::endl;
262
+ else
263
+ pos.append(afp_h5->location);
264
hierarchy.pop();
265
}
266
0 commit comments