null pointer in errorr handling

This commit is contained in:
Vitor Santos Costa 2016-06-17 16:27:56 +01:00
parent 57161d83f4
commit 8f489b0799

View File

@ -504,8 +504,11 @@ static Int find_code_in_clause(PredEntry *pp, yamop *codeptr, void **startp,
cl = ClauseCodeToStaticClause(clcode);
do {
if (IN_BLOCK(codeptr, cl, cl->ClSize)) {
if (startp)
if (cl == NULL)
return 0;
if (IN_BLOCK(codeptr, cl, cl->ClSize)) {
if
(startp)
*startp = (CODEADDR)cl;
if (endp)
*endp = (CODEADDR)cl + cl->ClSize;