Commit a89b52e9 authored by Marek Kasik's avatar Marek Kasik

glib: Return nullptr if n_ranges is nullptr

Return nullptr if we don't have correct pointer for storing
number of ranges in poppler_document_get_print_page_ranges().

poppler/poppler#290
parent 5a61eb75
......@@ -1751,8 +1751,9 @@ poppler_document_get_print_page_ranges (PopplerDocument *document,
std::vector<std::pair<int, int>> ranges;
PopplerPageRange *result = nullptr;
g_return_val_if_fail (n_ranges != nullptr, nullptr);
*n_ranges = 0;
g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), nullptr);
catalog = document->doc->getCatalog ();
if (catalog && catalog->isOk ()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment