summaryrefslogtreecommitdiff
path: root/src/lib/ector
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-08-08 23:34:02 +0900
committerHermet Park <hermetpark@gmail.com>2019-08-08 23:34:02 +0900
commit9b7d71df79622246dc325ee70e0a7d23338eb9b8 (patch)
treef46e788c04d2a719235a8ddc474d9cac7295d00b /src/lib/ector
parent49343b628afaf776c38871fe8270f56ad4a1ed1d (diff)
ector: ++safety.
null handling just in corner case.
Diffstat (limited to 'src/lib/ector')
-rw-r--r--src/lib/ector/software/ector_software_rasterizer.c3
-rw-r--r--src/lib/ector/software/ector_software_surface.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c
index fcf3438..2b995c9 100644
--- a/src/lib/ector/software/ector_software_rasterizer.c
+++ b/src/lib/ector/software/ector_software_rasterizer.c
@@ -270,8 +270,7 @@ _blend_gradient(int count, const SW_FT_Span *spans, void *user_data)
270 if (data->type == LinearGradient) fetchfunc = &fetch_linear_gradient; 270 if (data->type == LinearGradient) fetchfunc = &fetch_linear_gradient;
271 if (data->type == RadialGradient) fetchfunc = &fetch_radial_gradient; 271 if (data->type == RadialGradient) fetchfunc = &fetch_radial_gradient;
272 272
273 if (!fetchfunc) 273 if (!fetchfunc || !data->raster_buffer->pixels.u32) return;
274 return;
275 274
276 comp_func = efl_draw_func_span_get(data->op, data->mul_col, data->gradient->alpha); 275 comp_func = efl_draw_func_span_get(data->op, data->mul_col, data->gradient->alpha);
277 276
diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c
index 1008fe5..40dbe67 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -259,6 +259,8 @@ _ector_software_surface_ector_surface_draw_image(Eo *obj EINA_UNUSED,
259 const int pix_stride = pd->rasterizer->fill_data.raster_buffer->stride / 4; 259 const int pix_stride = pd->rasterizer->fill_data.raster_buffer->stride / 4;
260 260
261 uint32_t *src = bd->pixels.u32; 261 uint32_t *src = bd->pixels.u32;
262 if (!src) return EINA_FALSE;
263
262 for (unsigned int local_y = 0; local_y < bd->generic->h; local_y++) 264 for (unsigned int local_y = 0; local_y < bd->generic->h; local_y++)
263 { 265 {
264 uint32_t *dst = pd->rasterizer->fill_data.raster_buffer->pixels.u32 + (x + ((local_y + y) * pix_stride)); 266 uint32_t *dst = pd->rasterizer->fill_data.raster_buffer->pixels.u32 + (x + ((local_y + y) * pix_stride));