1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

lv_draw: document assertion so others understand quickly

This commit is contained in:
Themba Dube 2019-11-17 08:59:22 -05:00
parent d7232be181
commit c607e45b48

View File

@ -66,6 +66,7 @@ void * lv_draw_buf_get(uint32_t size)
if(_lv_draw_buf[i].used == 0) { if(_lv_draw_buf[i].used == 0) {
_lv_draw_buf[i].used = 1; _lv_draw_buf[i].used = 1;
_lv_draw_buf[i].size = size; _lv_draw_buf[i].size = size;
/*if this fails you probably need to increase your LV_MEM_SIZE/heap size*/
_lv_draw_buf[i].p = lv_mem_realloc(_lv_draw_buf[i].p, size); _lv_draw_buf[i].p = lv_mem_realloc(_lv_draw_buf[i].p, size);
LV_ASSERT_MEM(_lv_draw_buf[i].p); LV_ASSERT_MEM(_lv_draw_buf[i].p);
return _lv_draw_buf[i].p; return _lv_draw_buf[i].p;