Skip to content

Commit

Permalink
fix null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertSchwede committed Aug 20, 2024
1 parent 0ea8ef3 commit 3158f6f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions libwarpaffine/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,7 @@ int libmain(int argc, char** _argv)
doWarp.DoOperation();
WaitUntilDone(app_context, doWarp);

std::cout<<"aaa"<<std::endl;
reader->EnumerateAttachments([&writer, &reader](int index, const libCZI::AttachmentInfo& info){writer->AddAttachment(reader->ReadAttachment(index)); return true;});
std::cout<<"xxx"<<std::endl;

switch (const auto type_of_operation = app_context.GetCommandLineOptions().GetTypeOfOperation())
{
Expand Down
3 changes: 1 addition & 2 deletions libwarpaffine/sliceswriter/SlicesWriterTbb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ void CziSlicesWriterTbb::AddAttachment(const std::shared_ptr<libCZI::IAttachment
size_t size = 0;
ai.ptrData = attachment->GetRawData(&size).get();
ai.dataSize = size;
std::cout<<"adding attachment"<<std::endl;
ai.SetContentFileType(attachment->GetAttachmentInfo().contentFileType);
ai.contentGuid = attachment->GetAttachmentInfo().contentGuid;
this->writer_->SyncAddAttachment(ai);
Expand Down Expand Up @@ -261,7 +260,7 @@ std::uint32_t CziSlicesWriterTbb::GetNumberOfPendingSliceWriteOperations()
void CziSlicesWriterTbb::CopyMetadata(libCZI::IXmlNodeRead* rootSource, libCZI::IXmlNodeRw* rootDestination)
{
// what we do here is to simple copy the values of those nodes from the source to the destination
static constexpr array<const char*, 6> paths_to_copy =
static constexpr array<const char*, 5> paths_to_copy =
{
"Metadata/Information/Image/SizeX",
"Metadata/Information/Image/SizeY",
Expand Down

0 comments on commit 3158f6f

Please sign in to comment.