[libcamera-devel,libcamera-devel,v3,0/1] libcamera: converter: Check converter validity
mbox series

Message ID 20230302190629.12506-1-suhrid.subramaniam@mediatek.com
Headers show
Series
  • libcamera: converter: Check converter validity
Related show

Message

Suhrid Subramaniam March 2, 2023, 7:06 p.m. UTC
- In cases where ConverterFactoryBase::create returns a nullptr,
  converter_->isValid() causes a segmentation fault.

- Solve this by checking if converter_ is a nullptr.

- Additionally, check for converter validity in the create function itself
  and return a nullptr if the converter is invalid.

Suhrid Subramaniam (1):
  libcamera: converter: Check converter validity

 src/libcamera/converter.cpp              | 3 ++-
 src/libcamera/pipeline/simple/simple.cpp | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)