Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41af6fc

Browse files
authored
Catch only std::bad_alloc
1 parent e6e5cdf commit 41af6fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_tkagg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int PyAggImagePhoto(ClientData clientdata, Tcl_Interp *interp, int
118118
try {
119119
destbuffer = new agg::int8u[deststride * destheight];
120120
}
121-
catch (...) {
121+
catch (std::bad_alloc) {
122122
TCL_APPEND_RESULT(interp, "could not allocate memory", (char *)NULL);
123123
return TCL_ERROR;
124124
}

0 commit comments

Comments
 (0)