mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
For some reason, using static nested function as callback = segfault.
Fixed.
This commit is contained in:
parent
9a3acc8035
commit
8bbd7bc13a
1 changed files with 8 additions and 6 deletions
|
@ -85,16 +85,18 @@ GIB_Function_Free (void *ele, void *ptr)
|
|||
Builds a new function struct and returns
|
||||
a pointer to it.
|
||||
*/
|
||||
|
||||
static void
|
||||
afree (void *data, void *unused)
|
||||
{
|
||||
free (data);
|
||||
};
|
||||
|
||||
|
||||
static gib_function_t *
|
||||
GIB_Function_New (const char *name)
|
||||
{
|
||||
gib_function_t *new = calloc (1, sizeof (gib_function_t));
|
||||
|
||||
static void
|
||||
afree (void *data, void *unused)
|
||||
{
|
||||
free (data);
|
||||
};
|
||||
|
||||
new->text = dstring_newstr ();
|
||||
new->name = strdup (name);
|
||||
|
|
Loading…
Reference in a new issue