Unity Quits Because Of Script!!!

This Is My Script. It’s Attached To GUI Texture. When I Click It First Person Controller And F.P. Camera Scripts Are Deactivated And Car And Car Camera Scripts Are Activated (Like You Sit In Car). When I Click GUI Texture Unity Quits (With Windows’s “Send Error Report” Window). Please Help!!!

I Have Windows 7.

var buttonType : String = "Drive/XTools";
var FPController : GameObject;
var car : GameObject;
var carCamera : GameObject;
var fPCamera : GameObject;
var gui1 : GameObject;
var gui2 : GameObject;
var guix : GameObject;
function OnMouseDown ()
{
	if(buttonType == "Drive")
	{
		FPController.GetComponent("Character Controller").enabled = false;
		FPController.GetComponent("Mouse Look").enabled = false;
		FPController.GetComponent("Character Motor").enabled = false;
		FPController.GetComponent("FPSInput Controller").enabled = false;
		fPCamera.GetComponent("Camera").enabled = false;
		car.GetComponent("Car").enabled = true;
		carCamera.GetComponent("Camera").enabled = true;
		gui1.GetComponent("GUI Texture").enabled = false;
		gui2.GetComponent("GUI Texture").enabled = false;
		guix.GetComponent("GUI Texture").enabled = false;
	}
}

Try commenting out one line of code at a (inside the ‘if’) and try until it stops crashing. The last thing you commented out was the problem. I would guess the problem is there is no “GUI Texture” component, so you are trying to set .enabled on a null reference. You might try “GUITexture” or better

gui1.GetComponent().enabled = true;