Quote:
if(struct.member!=NULL) //make sure not un-initialised
Even that wont work when the structure is uninitialised. Although it doesn't generate a crash, it is not functioning properly either. Uninitialised members are not NULL, they are literally nothing. Thus the statement will be true. struct.member=NULL; is required for the statement to be false.

You always have to init every member at creation of the structure, that's the safest.


Click and join the 3dgs irc community!
Room: #3dgs