aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/compression/compression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/compression/compression.cpp')
-rw-r--r--src/lib/compression/compression.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/compression/compression.cpp b/src/lib/compression/compression.cpp
index 499fc1adf..0e0221fe6 100644
--- a/src/lib/compression/compression.cpp
+++ b/src/lib/compression/compression.cpp
@@ -59,8 +59,10 @@ Compressor_Transform* do_make_compressor(const std::string& type, const std::str
std::unique_ptr<Transform> t(get_transform(t_name));
- Compressor_Transform* r = dynamic_cast<Compressor_Transform*>(t.get());
+ if(!t)
+ return nullptr;
+ Compressor_Transform* r = dynamic_cast<Compressor_Transform*>(t.get());
if(!r)
throw std::runtime_error("Bad cast of compression object " + t_name);