Branch: Tag:

1999-11-14

1999-11-14 20:14:46 by Martin Stjernholm <mast@lysator.liu.se>

Fixed dereferencing NULL bug in f_destruct (seems like o->prog can be
zero sometimes; it has at least been observed during shutdown with
DMALLOC).

Rev: src/builtin_functions.c:1.207

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.206 1999/11/14 18:48:13 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.207 1999/11/14 20:14:46 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
1399:       o=fp->current_object;    } -  if (o->prog->flags & PROGRAM_NO_EXPLICIT_DESTRUCT) +  if (o->prog && o->prog->flags & PROGRAM_NO_EXPLICIT_DESTRUCT)    PIKE_ERROR("destruct", "Object can't be destructed explicitly.\n", sp, args);   #ifdef PIKE_SECURITY    if(!CHECK_DATA_SECURITY(o, SECURITY_BIT_DESTRUCT))