NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUI.DrawTexture

I need a character to equip a gasmask as soon as he walks into a posioned area. The image has to be across the entire screen. The gasmask GUI is the part that doesn’t work. Everything else is fine. Line 23.

#pragma strict

public var MaskGUI : Texture;
private var player : GameObject;                    // Reference to the player GameObject.
private var playerInventory : PlayerInventory;  // Reference to the PlayerInventory script.
public var GasmaskGrab : AudioClip;                         // Audioclip to play when the mask is picked up.
public var GasPoisoning : AudioClip;

function Awake ()
{
    // References.
    player = GameObject.FindGameObjectWithTag(Tags.player);
    playerInventory = player.GetComponent(PlayerInventory);
}


function OnTriggerEnter (other : Collider)
{
        if(other.gameObject.name == "Player"){
        // ... if the player has the mask...
        if(playerInventory.hasMask){
                AudioSource.PlayClipAtPoint(GasmaskGrab, transform.position);
                GUI.DrawTexture(Rect(10,10,60,60), MaskGUI, ScaleMode.StretchToFill, true, 10.0f);
                }
        else
        {
                // If the player doesn't have the mask, kill him.
                AudioSource.PlayClipAtPoint(GasPoisoning, transform.position);
                yield WaitForSeconds(2);
                GameObject.Destroy(player);
                Debug.Log ("Gas Poidoned");
            }
        }
        }
   
function OnTriggerExit (other : Collider)
{
        if(other.gameObject.name == "Player"){    
                AudioSource.PlayClipAtPoint(GasmaskGrab, transform.position);
        }
}

GUI methods work in OnGUI function, not OnTriggerEnter. Try this :

private var gasMask:boolean = false;

function OnTriggerEnter (other : Collider)
{
    if(other.gameObject.name == "Player"){
        // ... if the player has the mask...
        if(playerInventory.hasMask){
            AudioSource.PlayClipAtPoint(GasmaskGrab, transform.position);
            gasMask = true;
        }
        else
        {
            // If the player doesn't have the mask, kill him.
            AudioSource.PlayClipAtPoint(GasPoisoning, transform.position);
            yield WaitForSeconds(2);
            GameObject.Destroy(player);
            Debug.Log ("Gas Poidoned");
        }
    }
}

function OnTriggerExit (other : Collider)
{
    if(other.gameObject.name == "Player"){    
        AudioSource.PlayClipAtPoint(GasmaskGrab, transform.position);
        gasMask = false;
    }
}

function OnGUI() {
    if(gasMask) GUI.DrawTexture(Rect(10,10,60,60), MaskGUI, ScaleMode.StretchToFill, true, 10.0f);
}