Skip to content

Commit 0218e4a

Browse files
committed
fix a bad free crash
1 parent 7ad41ca commit 0218e4a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

TODO

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
valgrind!
2+
3+
==1537060== Conditional jump or move depends on uninitialised value(s)
4+
==1537060== at 0x1978B5: drawstate_free (plotdisplay.c:183)
5+
==1537060== by 0x198C01: plotdisplay_to_image (plotdisplay.c:573)
6+
==1537060== by 0x14038D: apply_graph_export_image_call (builtin.c:521)
7+
18
# menu redesign
29

310
- remove unused widgets

src/plotdisplay.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ drawstate_draw(Drawstate *state,
274274
static void
275275
drawstate_init(Drawstate *state)
276276
{
277+
state->kccfg = NULL;
278+
state->kplot = NULL;
279+
277280
// minimal config for thumbnail draw
278281
kplotcfg_defaults(&state->kcfg_thumbnail);
279282
state->kcfg_thumbnail.xinterval = 0;
@@ -293,8 +296,6 @@ drawstate_init(Drawstate *state)
293296
state->kcfg_window.clrs = plotdisplay_series_ccfg;
294297
state->kcfg_window.ticlabelfont = plotdisplay_tic_font;
295298
state->kcfg_window.axislabelfont = plotdisplay_axis_font;
296-
297-
state->kplot = NULL;
298299
}
299300

300301
static void

0 commit comments

Comments
 (0)