aboutsummaryrefslogtreecommitdiffstats
path: root/trace-plot.c
diff options
context:
space:
mode:
Diffstat (limited to 'trace-plot.c')
-rw-r--r--trace-plot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/trace-plot.c b/trace-plot.c
index 6531a5e..c6f7e7a 100644
--- a/trace-plot.c
+++ b/trace-plot.c
@@ -111,10 +111,11 @@ void trace_graph_plot_remove(struct graph_info *ginfo, struct graph_plot *plot)
111 int pos = plot->pos; 111 int pos = plot->pos;
112 int i; 112 int i;
113 113
114 if (pos < 0 || pos >= ginfo->plots || !ginfo->plots) 114 if (plot->cb->destroy)
115 return; 115 plot->cb->destroy(ginfo, plot);
116 116
117 free(ginfo->plot_array[pos]); 117 free(plot->label);
118 free(plot);
118 119
119 ginfo->plots--; 120 ginfo->plots--;
120 121