From 45957b09a5fce20e36bfa9216de542fdd5b2f32d Mon Sep 17 00:00:00 2001
From: "Emden R. Gansner" <erg@alum.mit.edu>
Date: Thu, 5 Dec 2013 14:04:36 -0500
Subject: [PATCH] Fix bug 2393

---
 lib/common/emit.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/common/emit.c b/lib/common/emit.c
index 3eb61564e..7a241dd2b 100644
--- a/lib/common/emit.c
+++ b/lib/common/emit.c
@@ -3138,6 +3138,8 @@ static void init_job_viewport(GVJ_t * job, graph_t * g)
     Z = 1.0;
     if (GD_drawing(g)->size.x > 0.001 && GD_drawing(g)->size.y > 0.001) { /* graph size was given by user... */
 	size = GD_drawing(g)->size;
+	if (sz.x == 0) sz.x = size.x;
+	if (sz.y == 0) sz.y = size.y;
 	if ((size.x < sz.x) || (size.y < sz.y) /* drawing is too big (in either axis) ... */
 	    || ((GD_drawing(g)->filled) /* or ratio=filled requested and ... */
 		&& (size.x > sz.x) && (size.y > sz.y))) /* drawing is too small (in both axes) ... */
-- 
2.40.0