Here is a working example for you that uses a pointer to the pointer:
Code:
#include <acknex.h>

void waitForThePointerToBecomeNull(void** p)
{
	while (*p)
		wait(1);

	sys_exit("e voila...");
}

TEXT* myText = NULL;

void main()
{
	myText = txt_create(1,1);
	waitForThePointerToBecomeNull(&myText);
	
	wait(-2);
	
	ptr_remove(myText);
	myText = NULL;
}



Always learn from history, to be sure you make the same mistakes again...