Skip to content
Snippets Groups Projects
Commit c00fee82 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[App/IO] Avoid accidental nullptr access.

parent 213fff3c
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,8 @@ int GMSInterface::readBoreholesFromGMS(std::vector<GeoLib::Point*>* boreholes,
// later on!
if (pnt[2] != depth)
{
if (newBorehole == nullptr)
OGS_FATAL("Trying to access a nullptr.");
newBorehole->addSoilLayer(
pnt[0], pnt[1], pnt[2], sName);
sName = (*(++it));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment