Skip to content

Commit

Permalink
Fix crash when ioproxy is passed to a plugin that doesn't support it (A…
Browse files Browse the repository at this point in the history
…cademySoftwareFoundation#3453)

The plugin was freed before the error message printed that depends on
it.
  • Loading branch information
lgritz committed Jun 25, 2022
1 parent cc670d9 commit 85f08fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libOpenImageIO/imageioplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,10 @@ ImageOutput::create(string_view filename, Filesystem::IOProxy* ioproxy,
}
if (out && ioproxy) {
if (!out->supports("ioproxy")) {
out.reset();
OIIO::pvt::errorfmt(
"ImageOutput::create called with IOProxy, but format {} does not support IOProxy",
out->format_name());
out.reset();
} else {
out->set_ioproxy(ioproxy);
}
Expand Down

0 comments on commit 85f08fa

Please sign in to comment.