Browse Source

Prevent segfault if SendStat is NULL and HAVE_FTIME is undefined.

Patch no. 28 offered by Liang Chang
pre-master-46
Holger Vogt 7 years ago
parent
commit
2c7860361d
  1. 8
      src/sharedspice.c

8
src/sharedspice.c

@ -1611,6 +1611,10 @@ void SetAnalyse(
int DecaPercent /*in: 10 times the progress [%]*/
/*HWND hwAnalyse, in: global handle to analysis window */
) {
/* If caller has sent NULL address for statfcn */
if (nostatuswanted)
return;
#ifdef HAVE_FTIME
static int OldPercent = -2; /* Previous progress value */
static char OldAn[128]; /* Previous analysis type */
@ -1626,10 +1630,6 @@ void SetAnalyse(
if (ft_curckt)
ckt = ft_curckt->ci_ckt;
/* If caller has sent NULL address for statfcn */
if (nostatuswanted)
return;
strcpy(OldAn, "?"); /* initial value */
if ((DecaPercent == OldPercent) && !strcmp(OldAn, Analyse))

Loading…
Cancel
Save