miniview: add checks on termio_pty_get(). Closes CID1356203 and CID1356204

This commit is contained in:
Boris Faure 2016-06-04 15:43:23 +02:00
parent 30cb65625b
commit 8b6036a8f7
1 changed files with 2 additions and 0 deletions

View File

@ -145,6 +145,7 @@ _is_top_bottom_reached(Miniview *mv)
EINA_SAFETY_ON_NULL_RETURN_VAL(mv, EINA_FALSE);
ty = termio_pty_get(mv->termio);
EINA_SAFETY_ON_NULL_RETURN_VAL(ty, EINA_FALSE);
history_len = termpty_backlog_length(ty);
if (( (- mv->img_hist) > (int)(mv->img_h - mv->rows - (mv->rows / 2))) &&
@ -521,6 +522,7 @@ _deferred_renderer(void *data)
miniview_colors_get(mv, colors);
ty = termio_pty_get(mv->termio);
EINA_SAFETY_ON_NULL_RETURN_VAL(ty, EINA_FALSE);
evas_object_geometry_get(mv->termio, &ox, &oy, &ow, &oh);
if ((ow == 0) || (oh == 0) || (mv->cols == 1)) return EINA_TRUE;