src/pEpEngine.c
changeset 2532 4d46b7dd0fce
parent 2526 c254f28206de
child 2539 58c77e002d60
child 2542 b7f6df848795
     1.1 --- a/src/pEpEngine.c	Thu Feb 22 17:18:24 2018 +0100
     1.2 +++ b/src/pEpEngine.c	Sat Feb 24 10:57:24 2018 +0100
     1.3 @@ -3411,8 +3411,16 @@
     1.4      } while (result != SQLITE_DONE);
     1.5  
     1.6      sqlite3_reset(session->crashdump);
     1.7 -    if (status == PEP_STATUS_OK)
     1.8 -        *logdata = _logdata;
     1.9 +    if (status == PEP_STATUS_OK) {
    1.10 +        if (_logdata) {
    1.11 +            *logdata = _logdata;
    1.12 +        }
    1.13 +        else {
    1.14 +            *logdata = strdup("");
    1.15 +            if (!*logdata)
    1.16 +                goto enomem;
    1.17 +        }
    1.18 +    }
    1.19  
    1.20      goto the_end;
    1.21