diff --git a/src/main.c b/src/main.c
index 6665290634a7c9de6a710275ad140e20c68139e3..a8218a83827c164ca06aeec89845626dc9e9e6f8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1910,10 +1910,10 @@ static void plot_draw( GtkDrawingArea* plot,
 			( context->data->y[i].axis == RIGHT &&
 				context->yrlog );
 
-		double x;
-		double xnext;
-		double y;
-		double ynext;
+		double x = 0;
+		double xnext = 0;
+		double y = 0;
+		double ynext = 0;
 
 		if ( context->data->y[i].present ) {