mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add a null image check
This commit is contained in:
parent
072239c3eb
commit
56cffd7283
@ -8,6 +8,7 @@
|
||||
%ModuleCode
|
||||
#include <imageops.h>
|
||||
#define IMAGEOPS_PREFIX \
|
||||
if (a0->isNull()) { PyErr_SetString(PyExc_ValueError, "Cannot operate on null QImage"); return NULL; } \
|
||||
try {
|
||||
#define IMAGEOPS_SUFFIX \
|
||||
} catch (std::out_of_range &exc) { PyErr_SetString(PyExc_ValueError, exc.what()); return NULL; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user