diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index 1f576cc2f..36c7ab503 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -866,6 +866,11 @@ plotit(wordlist *wl, char *hcopy, char *devname) goto quit; } + if(isinf(ylims[0]) || isinf(ylims[1])) { + fprintf(cp_err, "Error: Y values must not be infinite\n"); + goto quit; + } + /* Fix the plot limits for smith and polar grids. */ if ((!xlim || !ylim) && (gtype == GRID_POLAR)) { double mx, my, rad;