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

[GL] Abort TemplateVec ctor if nullptr input.

This restores the previous behaviour.
parent 18ee33f7
No related branches found
No related tags found
No related merge requests found
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
#define TEMPLATEVEC_H_ #define TEMPLATEVEC_H_
#include <algorithm> #include <algorithm>
#include <cstdlib>
#include <map> #include <map>
#include <vector> #include <vector>
#include <string> #include <string>
// ThirdParty/logog #include <logog/include/logog.hpp>
#include "logog/include/logog.hpp"
namespace GeoLib namespace GeoLib
{ {
...@@ -58,8 +58,10 @@ public: ...@@ -58,8 +58,10 @@ public:
_name(name), _data_vec(data_vec), _name_id_map (elem_name_map) _name(name), _data_vec(data_vec), _name_id_map (elem_name_map)
{ {
if (_data_vec == nullptr) if (_data_vec == nullptr)
{
ERR("Constructor TemplateVec: vector of data elements is a nullptr."); ERR("Constructor TemplateVec: vector of data elements is a nullptr.");
assert(_data_vec); std::abort();
}
if (!_name_id_map) if (!_name_id_map)
_name_id_map = new NameIdMap; _name_id_map = new NameIdMap;
......
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