Skip to content
Snippets Groups Projects
Commit 4c3cdc11 authored by Julien Malik's avatar Julien Malik
Browse files

BUG: protect against null pointer

parent 1f2f5657
Branches
Tags
No related merge requests found
......@@ -77,12 +77,15 @@ public:
void Write()
{
typedef otb::StreamingImageFileWriter<VectorImageType> WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetInput(m_Image);
writer->SetFileName(this->GetFileName());
writer->Update();
if (m_Image.IsNotNull())
{
typedef otb::StreamingImageFileWriter<VectorImageType> WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetInput(m_Image);
writer->SetFileName(this->GetFileName());
writer->Update();
}
}
protected:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment