diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-03-23 12:48:55 +0100 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-03-23 12:48:55 +0100 |
| commit | ca5357a65a86b8823bdbf0d6a1c7530cf5cb8aa0 (patch) | |
| tree | bb38fa1a6439b8e586d59f1666c327f22ea674e2 /src/cppc4group.cpp | |
| parent | afaebd0407af3f88dfa9c46b74754a1d96f92ab5 (diff) | |
| download | cc4group-ca5357a65a86b8823bdbf0d6a1c7530cf5cb8aa0.tar.gz cc4group-ca5357a65a86b8823bdbf0d6a1c7530cf5cb8aa0.zip | |
CppC4Group constructor may throw std::bad_alloc if internal allocation fails
Diffstat (limited to 'src/cppc4group.cpp')
| -rw-r--r-- | src/cppc4group.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cppc4group.cpp b/src/cppc4group.cpp index 950a714..409f2ef 100644 --- a/src/cppc4group.cpp +++ b/src/cppc4group.cpp @@ -22,7 +22,10 @@ struct CppC4Group::Private { Private() : g{cc4group.new_()} { - + if(g == nullptr) + { + throw std::bad_alloc(); + } } Private(CC4Group* g) : g{g} |
