From 8b6036a8f73b2afd1f5fd592867d3d8b9d9eaf80 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sat, 4 Jun 2016 15:43:23 +0200 Subject: [PATCH] miniview: add checks on termio_pty_get(). Closes CID1356203 and CID1356204 --- src/bin/miniview.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/miniview.c b/src/bin/miniview.c index 7ff65eeb..551ae709 100644 --- a/src/bin/miniview.c +++ b/src/bin/miniview.c @@ -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;