Need help fixing a nullreferenceexception occuring when initializing an object : I've tried searching the internet for a while now, and maybe I just suck at searching because I don't know how to properly phrase the problem.

Anyway, my code looks like this:

            SystemOutput systemOutput = null;
            SystemCL system = null;
            WindowsForm wf = null;

            wf = new WindowsForm(system);
            systemOutput = new SystemOutput(wf);
            system = new SystemCL(systemOutput, wf);

The rest of the code doesn't really matter for the matter of solving my problem (I think?)
So as you can see the objects reference eachother, which means that if the other objects hasn't been initialized yet, it will give me an error. So I tried first making them null, but now the first object get a nullreferencepointer, because the object is null.

How do I fix this puzzle? Is there a better way to do this?