From b6e414b10b3ae7b28ad16da2027106ec59a99a0a Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 12 Aug 2018 12:58:39 -0400 Subject: Remove some extraneous null pointer checks (fixes #234) There were a few places in the code that were checking that a pointer wasn't null before deleting it, even though C++ has always allowed delete 0. Most of the code did not perform these checks. --- libqpdf/QPDFWriter.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libqpdf/QPDFWriter.cc') diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 30ba6f1f..71c48333 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -75,10 +75,7 @@ QPDFWriter::Members::~Members() { fclose(file); } - if (output_buffer) - { - delete output_buffer; - } + delete output_buffer; } QPDFWriter::QPDFWriter(QPDF& pdf) : -- cgit v1.2.3-54-g00ecf