mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 22:14:07 +02:00
Add a null image check
This commit is contained in:
parent
072239c3eb
commit
56cffd7283
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Reference in a new issue