Skip to content

Commit

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

The plugin was freed before the error message printed that depends on
it.
  • Loading branch information
lgritz authored Jun 25, 2022
1 parent 1e74b7e commit 5cee511
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 @@ -550,10 +550,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 5cee511

Please sign in to comment.