- image#set_file tmp_png;
- HExtlib.safe_remove tmp_png;
- let tmp_map = tempfile () in
- ignore (Sys.command (mk_gviz_cmd gviz_cmd map_flags fname tmp_map));
- self#load_map tmp_map;
- HExtlib.safe_remove tmp_map
+ (* CSC: it would be better to show something explaining that the
+ graph is empty *)
+ image#clear ()
+ end else begin
+ image#set_file tmp_png;
+ HExtlib.safe_remove tmp_png;
+ let tmp_map = tempfile () in
+ ignore (Sys.command (mk_gviz_cmd gviz_cmd map_flags fname tmp_map));
+ self#load_map tmp_map;
+ HExtlib.safe_remove tmp_map
+ end