mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2450 (Crash on send to PRS-700)
This commit is contained in:
parent
4f62582882
commit
c331252d14
@ -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…
x
Reference in New Issue
Block a user