Fix coredump seen in some code paths.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2723 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
84f51bf50c
commit
9655c5b093
|
@ -2828,6 +2828,9 @@ void FreeScriptInternalRep(Jim_Interp *interp, Jim_Obj *objPtr)
|
|||
int i;
|
||||
struct ScriptObj *script = (void*) objPtr->internalRep.ptr;
|
||||
|
||||
if (!script)
|
||||
return;
|
||||
|
||||
script->inUse--;
|
||||
if (script->inUse != 0) return;
|
||||
for (i = 0; i < script->len; i++) {
|
||||
|
|
Loading…
Reference in New Issue