From d0dbc7128029aebb51f1b15be3796228d1c3c93c Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 3 Aug 2024 11:39:22 +0200 Subject: [PATCH] allow other simulation types, e.g. ac prevents crash --- src/frontend/postcoms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/frontend/postcoms.c b/src/frontend/postcoms.c index 4ae09448f..848b4e9ea 100644 --- a/src/frontend/postcoms.c +++ b/src/frontend/postcoms.c @@ -469,6 +469,9 @@ com_sndprint(wordlist* wl) ngood += 1; } + if (vecs->v_plot->pl_scale->v_type != SV_TIME) + return; + if (!ngood) return; snd_init(ngood); @@ -482,7 +485,11 @@ com_sndprint(wordlist* wl) double samplerate = snd_get_samplerate(); while ((j < npoints)) { - double tme = bv->v_plot->pl_scale->v_realdata[j] * samplerate; + double tme; + if (isreal(bv->v_plot->pl_scale)) + tme = bv->v_plot->pl_scale->v_realdata[j] * samplerate; + else + tme = realpart(bv->v_plot->pl_scale->v_compdata[j]) * samplerate; int c = 0; for (v = bv; v; v = v->v_link2) { if (v->v_length <= j) {