diff --git a/src/kernel/faction.c b/src/kernel/faction.c index b52879464..f67dbe47a 100755 --- a/src/kernel/faction.c +++ b/src/kernel/faction.c @@ -217,6 +217,7 @@ int resolve_faction(variant id, void *address) result = -1; } } + assert(address); *(faction **)address = f; return result; } diff --git a/src/util/resolve.c b/src/util/resolve.c index cee4a9d19..e8dd0c17a 100644 --- a/src/util/resolve.c +++ b/src/util/resolve.c @@ -58,6 +58,7 @@ resolve_fun resolver) void ur_add(variant data, void *ptrptr, resolve_fun fun) { + assert(ptrptr); if (ur_list == NULL) { ur_list = malloc(BLOCKSIZE * sizeof(unresolved)); ur_begin = ur_current = ur_list; @@ -86,6 +87,7 @@ void resolve(void) ur_list = ur; continue; } + assert(ur->ptrptr); ur->resolve(ur->data, ur->ptrptr); ++ur; }