Commit 560fd4e5 authored by Mike Gabriel's avatar Mike Gabriel

nxagent/hw/NXextension.c: Allow CloseDownProc to be NULL. Required code…

nxagent/hw/NXextension.c: Allow CloseDownProc to be NULL. Required code de-duplication in nxagent. (Will be fixed by ArcticaProject/nx-libs#120 later on).
parent 4aec1134
......@@ -111,7 +111,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
int i;
register ExtensionEntry *ext, **newexts;
if (!MainProc || !SwappedMainProc || !CloseDownProc || !MinorOpcodeProc)
if (!MainProc || !SwappedMainProc || !MinorOpcodeProc)
return((ExtensionEntry *) NULL);
if ((lastEvent + NumEvents > LAST_EVENT) ||
(unsigned)(lastError + NumErrors > LAST_ERROR))
......@@ -296,7 +296,8 @@ CloseDownExtensions()
for (i = NumExtensions - 1; i >= 0; i--)
{
(* extensions[i]->CloseDown)(extensions[i]);
if (extensions[i]->CloseDown)
(* extensions[i]->CloseDown)(extensions[i]);
NumExtensions = i;
xfree(extensions[i]->name);
for (j = extensions[i]->num_aliases; --j >= 0;)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment