summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfedit_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfedit_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfedit_embeddertest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
index fcf7e3903b..ad3e0d15a8 100644
--- a/fpdfsdk/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/fpdfedit_embeddertest.cpp
@@ -900,12 +900,14 @@ TEST_F(FPDFEditEmbeddertest, TransformAnnot) {
ASSERT_TRUE(page);
// Add an underline annotation to the page without specifying its rectangle.
- ASSERT_TRUE(FPDFPage_CreateAnnot(page, FPDF_ANNOT_UNDERLINE, nullptr));
+ FPDF_ANNOTATION annot = FPDFPage_CreateAnnot(page, FPDF_ANNOT_UNDERLINE);
+ ASSERT_TRUE(annot);
// FPDFPage_TransformAnnots() should run without errors when modifying
// annotation rectangles.
FPDFPage_TransformAnnots(page, 1, 2, 3, 4, 5, 6);
+ FPDFPage_CloseAnnot(annot);
UnloadPage(page);
}