summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/roi.c b/roi.c
index 3033d0a..1fac018 100644
--- a/roi.c
+++ b/roi.c
@@ -198,7 +198,9 @@ button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer userdata
roi->roi_area.height = -roi->roi_area.height;
}
- do_roi(roi);
+ if (roi->roi_area.width != 0 &&
+ roi->roi_area.height != 0)
+ do_roi(roi);
roi->previous_draw.width = roi->previous_draw.height = 0;
gtk_widget_queue_draw(roi->drawing_area);