Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db98d01 commit 0c0ff8bCopy full SHA for 0c0ff8b
1 file changed
src/ft2font.cpp
@@ -193,7 +193,10 @@ FT2Image::py_write_bitmap(const Py::Tuple & args)
193
194
write_bitmap(fh);
195
196
- mpl_PyFile_DupClose(py_file, fh, offset);
+ if (mpl_PyFile_DupClose(py_file, fh, offset))
197
+ {
198
+ throw Py::Exception();
199
+ }
200
mpl_PyFile_CloseFile(py_file);
201
Py_DECREF(py_file);
202
@@ -2143,7 +2146,10 @@ static void close_file_callback(FT_Stream stream)
2143
2146
{
2144
2147
py_file_def *def = (py_file_def *)stream->descriptor.pointer;
2145
2148
- mpl_PyFile_DupClose(def->py_file, def->fp, def->offset);
2149
+ if (mpl_PyFile_DupClose(def->py_file, def->fp, def->offset))
2150
2151
2152
2153
2154
if (def->close_file) {
2155
mpl_PyFile_CloseFile(def->py_file);
0 commit comments