From c4abceef796471a64047435ba50762d30ccce6a5 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 10 Oct 2023 07:24:27 -0400 Subject: [PATCH] Make Visual Studio compiler happy. --- pdfio-stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pdfio-stream.c b/pdfio-stream.c index 20048c1..15cced7 100644 --- a/pdfio-stream.c +++ b/pdfio-stream.c @@ -464,9 +464,10 @@ _pdfioStreamOpen(pdfio_obj_t *obj, // I - Object // Try to decode/decompress the contents of this object... const char *filter = pdfioDictGetName(dict, "Filter"); // Filter value - pdfio_array_t *fa; // Filter array + pdfio_array_t *fa = pdfioDictGetArray(dict, "Filter"); + // Filter array - if (!filter && (fa = pdfioDictGetArray(dict, "Filter")) != NULL && pdfioArrayGetSize(fa) == 1) + if (!filter && fa && pdfioArrayGetSize(fa) == 1) { // Support single-valued arrays... filter = pdfioArrayGetName(fa, 0);