I am working on a project with a collegue using Source Control and i randomly get the following error when running on my machine whilst my collegue doesn't despite having the same code.

Sometimes i can click ok and proceed as normal but other times it kicks me back into Design mode.

It's more annoying than anything else but does anyone know what causes it or how to resolve it?

Code:
An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.

Additional information: Object reference not set to an instance of an object.