diff options
author | Matej Kenda <[email protected]> | 2015-11-02 14:38:19 +0100 |
---|---|---|
committer | Matej Kenda <[email protected]> | 2015-11-03 08:25:41 +0100 |
commit | 500d3dcca413a3c22be7e0950f8dde76f14a889a (patch) | |
tree | 400b9c8c1d593fbb3f79cfad70c0350717fa5188 /src/lib | |
parent | 50878a88d285344949f3257a4a9fa0137af2b5a2 (diff) |
Fixed crash in compression filter when transform argument is null.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/filters/comp_filter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/filters/comp_filter.cpp b/src/lib/filters/comp_filter.cpp index 61ac16f38..5e9ef577f 100644 --- a/src/lib/filters/comp_filter.cpp +++ b/src/lib/filters/comp_filter.cpp @@ -25,7 +25,12 @@ Compression_Decompression_Filter::Compression_Decompression_Filter(Transform* tr { m_transform.reset(dynamic_cast<Compressor_Transform*>(transform)); if(!m_transform) - throw std::invalid_argument("Transform " + transform->name() + " is not a compressor"); + { + if (transform) + throw std::invalid_argument("Transform " + transform->name() + " is not a compressor"); + else + throw std::invalid_argument("Transform is null"); + } } std::string Compression_Decompression_Filter::name() const |