Insert in Red Black Tree isn't working properly
<p>I'm having a problem with the insert function in my RedBlackTree.
For some reason it won't stop (Stack overflow).
Iv'e tried debugging the program for over 2 hours, and I haven't found the solution to the problem.
Thanks for your help :)</p>

<pre><code>public void Insert(RedBlackNode z,RedBlackTree tree)
{
    RedBlackNode x = tree.head;
    RedBlackNode y = tree.nullNode;
    while (x != tree.nullNode &amp;&amp; x!=null)
    {
        y = x;
        if(z.bankNum &lt; x.bankNum)
            x = x.left;
        else
            x = x.right;
    }

    z.father = y;

    if(y == tree.nullNode){
        tree.head = z;
    }
    else {
        if(z.bankNum &lt;y.bankNum)
        y.left = z;
    else
        y.right = z;
    }
    z.left = tree.nullNode;
    z.right = tree.nullNode;
    z.color = this.RED;
    tree.InsertFixup(z);
}
</code></pre>