hey, the following situation...
i have a bitmap pointer like this
Code:
BMAP* b_dot = NULL;
char* b_dot_file = "dot.tga";
//then i fill it like this
BMAP* bmapCheck(BMAP* source, char* file)
{
if (source == NULL) {
source = bmap_create(file);
}
return(source);
}
it gets filled the first time, but also the second and so on... so i produce some sort of filling the memory forever.
so source is always == NULL but shouldn't it be filled the second time i run this function?
right now its not and a new bitmap is created in memory everytime i rerun the function.
it gets called like this from a particle function f.i.
p.bmap=bmapCheck(b_dot, b_dot_file);
thanks for any help.