summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--otherlibs/graph/open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/otherlibs/graph/open.c b/otherlibs/graph/open.c
index 570429dfee..f375f7eb20 100644
--- a/otherlibs/graph/open.c
+++ b/otherlibs/graph/open.c
@@ -219,6 +219,8 @@ value caml_gr_close_graph(void)
XFreeGC(caml_gr_display, caml_gr_bstore.gc);
XFreePixmap(caml_gr_display, caml_gr_bstore.win);
XFlush(caml_gr_display);
+ XCloseDisplay (caml_gr_display);
+ caml_gr_display = NULL;
}
return Val_unit;
}