summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vcr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vcr.c b/src/vcr.c
index 3fb9a9d..9a42e36 100644
--- a/src/vcr.c
+++ b/src/vcr.c
@@ -1124,6 +1124,9 @@ void vcr_mark_finish_line(vcr_t *vcr, vcr_layer_t layer, int row)
/* FIXME: the layers in backend/vcr etc should be in a layer-indexable array */
assert(layer == VCR_LAYER_GRAPHA || layer == VCR_LAYER_GRAPHB);
+ if (row * VCR_ROW_HEIGHT >= vcr->height)
+ return;
+
switch (vcr->backend->type) {
#ifdef USE_XLIB
case VCR_BACKEND_TYPE_XLIB: {
@@ -1555,6 +1558,9 @@ void vcr_stash_row(vcr_t *vcr, vcr_layer_t layer, int row)
assert(layer == VCR_LAYER_GRAPHA || layer == VCR_LAYER_GRAPHB);
/* for now we only support stashing graphs */
+ if (row * VCR_ROW_HEIGHT >= vcr->height)
+ return;
+
switch (vcr->backend->type) {
#ifdef USE_XLIB
case VCR_BACKEND_TYPE_XLIB: {
@@ -1610,6 +1616,9 @@ void vcr_unstash_row(vcr_t *vcr, vcr_layer_t layer, int row)
assert(vcr->backend);
assert(layer == VCR_LAYER_GRAPHA || layer == VCR_LAYER_GRAPHB);
+ if (row * VCR_ROW_HEIGHT >= vcr->height)
+ return;
+
switch (vcr->backend->type) {
#ifdef USE_XLIB
case VCR_BACKEND_TYPE_XLIB: {
© All Rights Reserved