summaryrefslogtreecommitdiff
path: root/src/libcamera/converter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/converter.cpp')
-rw-r--r--src/libcamera/converter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcamera/converter.cpp b/src/libcamera/converter.cpp
index 3de39cff..fa0f1ec8 100644
--- a/src/libcamera/converter.cpp
+++ b/src/libcamera/converter.cpp
@@ -227,7 +227,9 @@ std::unique_ptr<Converter> ConverterFactoryBase::create(MediaDevice *media)
<< factory->name_ << " factory with "
<< (it == compatibles.end() ? "no" : media->driver()) << " alias.";
- return factory->createInstance(media);
+ std::unique_ptr<Converter> converter = factory->createInstance(media);
+ if (converter->isValid())
+ return converter;
}
return nullptr;