From 038cd084817aca8017255a6b3782fcba2688d2cb Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 18 May 2015 14:29:22 -0700 Subject: Merge to XFA: Add safe FX_Alloc2D() macro Original Review URL: https://codereview.chromium.org/1143663004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1136673005 --- core/src/fxge/agg/agg23/fx_agg_path_storage.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'core/src/fxge/agg') diff --git a/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp b/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp index 8c4b701ebe..b4b184e0a4 100644 --- a/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp +++ b/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp @@ -51,10 +51,7 @@ void path_storage::allocate_block(unsigned nb) { if(nb >= m_max_blocks) { FX_FLOAT** new_coords = - FX_Alloc( FX_FLOAT*, (m_max_blocks + block_pool) * 2); - if (!new_coords) { - return; - } + FX_Alloc2D(FX_FLOAT*, m_max_blocks + block_pool, 2); unsigned char** new_cmds = (unsigned char**)(new_coords + m_max_blocks + block_pool); if(m_coord_blocks) { -- cgit v1.2.3