Fix crash when a document cannot be loaded

This commit is contained in:
David Capello 2014-08-22 09:46:25 -03:00
parent 9135461627
commit e1a4a8b09f

View File

@ -111,7 +111,7 @@ Document* load_document(Context* context, const char* filename)
document = fop->document;
fop_free(fop);
if (context)
if (document && context)
document->setContext(context);
return document;