aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-06-04 15:43:23 +0200
committerBoris Faure <billiob@gmail.com>2016-06-04 15:44:17 +0200
commit8b6036a8f73b2afd1f5fd592867d3d8b9d9eaf80 (patch)
treecc3afe5b801c747930eabc8bb12e370e0f1d0a59
parentman: add some dots at end of sentences and myself as maintainer (diff)
downloadterminology-8b6036a8f73b2afd1f5fd592867d3d8b9d9eaf80.tar.gz
miniview: add checks on termio_pty_get(). Closes CID1356203 and CID1356204
-rw-r--r--src/bin/miniview.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/miniview.c b/src/bin/miniview.c
index 7ff65ee..551ae70 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;