Prevent segfault if SendStat is NULL and HAVE_FTIME is undefined.

Patch no. 28 offered by Liang Chang
This commit is contained in:
Holger Vogt 2018-12-17 21:03:21 +01:00
parent db13f66519
commit 2c7860361d
1 changed files with 4 additions and 4 deletions

View File

@ -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))