mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 18:42:58 +02:00
Fix #2450 (Crash on send to PRS-700)
This commit is contained in:
parent
4f62582882
commit
c331252d14
1 changed files with 5 additions and 3 deletions
|
|
@ -48,10 +48,12 @@ podofo_PDFDoc_load(podofo_PDFDoc *self, PyObject *args, PyObject *kwargs) {
|
|||
try {
|
||||
self->doc->Load(buffer, size);
|
||||
} catch(const PdfError & err) {
|
||||
PyErr_SetString(PyExc_ValueError, PdfError::ErrorMessage(err.GetError()));
|
||||
const char *msg = PdfError::ErrorMessage(err.GetError());
|
||||
if (msg == NULL) msg = err.what();
|
||||
PyErr_SetString(PyExc_ValueError, msg);
|
||||
return NULL;
|
||||
}
|
||||
} else return NULL;
|
||||
}
|
||||
} else return NULL;
|
||||
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
|
|
|
|||
Loading…
Reference in a new issue