diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-10 18:54:24 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-10 18:54:24 +0000 |
commit | f0b7d5960d6c0bab6c4d8126be296b39f21c3134 (patch) | |
tree | 412edb08430644dfc874e7fe44c480579a0d0387 /fpdfsdk/cpdfsdk_formfillenvironment.cpp | |
parent | 4f261fffddddd97602e88fe462fef1a18a0b4782 (diff) | |
download | pdfium-f0b7d5960d6c0bab6c4d8126be296b39f21c3134.tar.xz |
Add Observable::ObservedPtr::HasObservable().
if (pObserved->HasObservable()) is more readable than if (*pObserved).
Change-Id: I61ad3deb8e9f30cdc120a05555c2558f34489681
Reviewed-on: https://pdfium-review.googlesource.com/c/43811
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_formfillenvironment.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_formfillenvironment.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp index 155fcc0455..52dfb526eb 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp +++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp @@ -646,7 +646,7 @@ bool CPDFSDK_FormFillEnvironment::SetFocusAnnot( return true; if (m_pFocusAnnot && !KillFocusAnnot(0)) return false; - if (!*pAnnot) + if (!pAnnot->HasObservable()) return false; CPDFSDK_PageView* pPageView = (*pAnnot)->GetPageView(); |