Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal
diff options
context:
space:
mode:
authorPhil Nash2014-03-07 06:58:33 +0000
committerPhil Nash2014-03-07 06:58:33 +0000
commitdd2810d60af6fd49946dd6992536aa4fb14cb7f0 (patch)
tree159c0bb73aceb9441039d4146fd470c2743b211e /include/internal
parent04f994a8fc452e8ac195d87b1eb609c4e195b7e9 (diff)
downloadcatch3-dd2810d60af6fd49946dd6992536aa4fb14cb7f0.tar.gz
build 30
- with Clara fix for null deref crash
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/catch_version.hpp2
-rw-r--r--include/internal/clara.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp
index b19a036e..85181d64 100644
--- a/include/internal/catch_version.hpp
+++ b/include/internal/catch_version.hpp
@@ -13,7 +13,7 @@
namespace Catch {
// These numbers are maintained by a script
- Version libraryVersion( 1, 0, 29, "master" );
+ Version libraryVersion( 1, 0, 30, "master" );
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
diff --git a/include/internal/clara.h b/include/internal/clara.h
index 476f2343..a8b50575 100644
--- a/include/internal/clara.h
+++ b/include/internal/clara.h
@@ -176,6 +176,7 @@ namespace Tbc {
#undef STITCH_TBC_TEXT_FORMAT_OPEN_NAMESPACE
+
#include <map>
#include <algorithm>
#include <stdexcept>
@@ -261,9 +262,9 @@ namespace Clara {
public:
BoundArgFunction() : functionObj( NULL ) {}
BoundArgFunction( IArgFunction<ConfigT>* _functionObj ) : functionObj( _functionObj ) {}
- BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj->clone() ) {}
+ BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj ? other.functionObj->clone() : NULL ) {}
BoundArgFunction& operator = ( BoundArgFunction const& other ) {
- IArgFunction<ConfigT>* newFunctionObj = other.functionObj->clone();
+ IArgFunction<ConfigT>* newFunctionObj = other.functionObj ? other.functionObj->clone() : NULL;
delete functionObj;
functionObj = newFunctionObj;
return *this;