Comparing custom object with NULL

Hi!
I have a custom object ( GameScreen ) that I want to compare with NULL value

Component
1
2
3
4
5
6
7
8
9
10
 GameScreen* parent;
void Component::setParent(GameScreen *gs)
{
 if (parent != NULL)
    {
        parent->RemoveComponent(this);
        std::cout<<"INFO: Parent anterior removido"<<std::endl;
    }
[...]
}


The problem is that although parent has no value, parent is not NULLand I
¿Any idea to resolve this?
If you want it to be a null pointer, make it a null pointer.
Jajajaja, sorry this stupid mistake.
Topic archived. No new replies allowed.