summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_annot.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-19 15:19:32 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-19 15:19:32 -0700
commit981a3468319eb24e696bb64ba84d9631fd26f1f7 (patch)
treec1136b807975ccc80199ff6593e69475261c1670 /core/src/fpdfdoc/doc_annot.cpp
parentbf4aa2cc93a67826247e887b2ba26a1b965eb616 (diff)
downloadpdfium-981a3468319eb24e696bb64ba84d9631fd26f1f7.tar.xz
Re-land: Remove FX_Alloc() null checks now that it can't return NULL.
Fixes the ordering of some assignments broken when converting to checked numerics in CFX_PathData::AddPointCount(). Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1135893008
Diffstat (limited to 'core/src/fpdfdoc/doc_annot.cpp')
-rw-r--r--core/src/fpdfdoc/doc_annot.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp
index 4ccce21f1c..0ddcb2305e 100644
--- a/core/src/fpdfdoc/doc_annot.cpp
+++ b/core/src/fpdfdoc/doc_annot.cpp
@@ -339,9 +339,6 @@ CPDF_PageObject* CPDF_Annot::GetBorder(FX_BOOL bPrint, const CPDF_RenderOptions*
dash_count ++;
}
pGraphState->m_DashArray = FX_Alloc(FX_FLOAT, dash_count);
- if (pGraphState->m_DashArray == NULL) {
- return NULL;
- }
pGraphState->m_DashCount = dash_count;
FX_DWORD i;
for (i = 0; i < pDashArray->GetCount(); i ++) {
@@ -352,9 +349,6 @@ CPDF_PageObject* CPDF_Annot::GetBorder(FX_BOOL bPrint, const CPDF_RenderOptions*
}
} else {
pGraphState->m_DashArray = FX_Alloc(FX_FLOAT, 2);
- if (pGraphState->m_DashArray == NULL) {
- return NULL;
- }
pGraphState->m_DashCount = 2;
pGraphState->m_DashArray[0] = pGraphState->m_DashArray[1] = 3 * 1.0f;
}
@@ -441,9 +435,6 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice, const CFX_AffineMatrix* p
dash_count ++;
}
graph_state.m_DashArray = FX_Alloc(FX_FLOAT, dash_count);
- if (graph_state.m_DashArray == NULL) {
- return ;
- }
graph_state.m_DashCount = dash_count;
FX_DWORD i;
for (i = 0; i < pDashArray->GetCount(); i ++) {
@@ -454,9 +445,6 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice, const CFX_AffineMatrix* p
}
} else {
graph_state.m_DashArray = FX_Alloc(FX_FLOAT, 2);
- if (graph_state.m_DashArray == NULL) {
- return ;
- }
graph_state.m_DashCount = 2;
graph_state.m_DashArray[0] = graph_state.m_DashArray[1] = 3 * 1.0f;
}