mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2024-12-26 05:18:21 +01:00
Fix another coverity issue.
This commit is contained in:
parent
63c0fc1926
commit
a962b1d069
@ -285,6 +285,10 @@ pdfioFileCreateObj(
|
||||
_pdfio_value_t value; // Object value
|
||||
|
||||
|
||||
// Range check input...
|
||||
if (!pdf || !dict)
|
||||
return (NULL);
|
||||
|
||||
value.type = PDFIO_VALTYPE_DICT;
|
||||
value.value.dict = dict;
|
||||
|
||||
@ -372,6 +376,9 @@ pdfioFileCreatePage(pdfio_file_t *pdf, // I - PDF file
|
||||
else
|
||||
dict = pdfioDictCreate(pdf);
|
||||
|
||||
if (!dict)
|
||||
return (NULL);
|
||||
|
||||
// Make sure the page dictionary has all of the required keys...
|
||||
if (!_pdfioDictGetValue(dict, "CropBox"))
|
||||
pdfioDictSetRect(dict, "CropBox", &pdf->crop_box);
|
||||
|
Loading…
Reference in New Issue
Block a user