Skip to content

Commit c0bbf87

Browse files
authored
Catch possible exception, identified by static analysis (#3681)
1 parent e4b5fa4 commit c0bbf87

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/iff.imageio/iffoutput.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ using namespace iff_pvt;
1212
class IffOutput final : public ImageOutput {
1313
public:
1414
IffOutput() { init(); }
15-
~IffOutput() override { close(); }
15+
~IffOutput() override
16+
{
17+
try {
18+
close();
19+
} catch (...) {
20+
}
21+
}
1622
const char* format_name(void) const override { return "iff"; }
1723
int supports(string_view feature) const override;
1824
bool open(const std::string& name, const ImageSpec& spec,

0 commit comments

Comments
 (0)