summaryrefslogtreecommitdiff
path: root/src/lib/ector
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-09-11 12:00:28 +0900
committerHermet Park <hermetpark@gmail.com>2019-09-11 12:01:25 +0900
commit3d50083f41c2e5dc087ff98ea3af104c70002546 (patch)
tree98d318b1012c01aa4a0999671f880fc79b6b8b2a /src/lib/ector
parent20abcba3b0d4222790ef5e2f41d56c7914e0ff26 (diff)
ector: don't alloc memory if the size is 0.
Diffstat (limited to 'src/lib/ector')
-rw-r--r--src/lib/ector/software/ector_software_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ector/software/ector_software_buffer.c b/src/lib/ector/software/ector_software_buffer.c
index b894f4c..5a5c940 100644
--- a/src/lib/ector/software/ector_software_buffer.c
+++ b/src/lib/ector/software/ector_software_buffer.c
@@ -96,7 +96,7 @@ _ector_software_buffer_base_ector_buffer_pixels_set(Eo *obj, Ector_Software_Buff
96 pd->nofree = EINA_TRUE; 96 pd->nofree = EINA_TRUE;
97 pd->writable = !!writable; 97 pd->writable = !!writable;
98 } 98 }
99 else 99 else if (stride > 0 && height > 0)
100 { 100 {
101 pd->pixels.u8 = calloc(stride * height, 1); 101 pd->pixels.u8 = calloc(stride * height, 1);
102 pd->nofree = EINA_FALSE; 102 pd->nofree = EINA_FALSE;