<commit_before>using System.IO;
using UnityEditor;
using UnityEngine;

namespace DTCommandPalette {
    public abstract class GameObjectCommand : ICommand {
        // PRAGMA MARK - ICommand
        public string DisplayTitle {
            get {
                return _obj.name;
            }
        }

        public string DisplayDetailText {
            get {
                return _obj.FullName();
            }
        }

        public abstract Texture2D DisplayIcon {
            get;
        }

        public bool IsValid() {
            return _obj != null;
        }

        public abstract void Execute();


        // PRAGMA MARK - Constructors
        public GameObjectCommand(GameObject obj) {
            _obj = obj;
        }


        // PRAGMA MARK - Internal
        protected GameObject _obj;
    }
}<commit_msg>Fix null references when game object is destroyed<commit_after>using System.IO;
using UnityEditor;
using UnityEngine;

namespace DTCommandPalette {
    public abstract class GameObjectCommand : ICommand {
        // PRAGMA MARK - ICommand
        public string DisplayTitle {
            get {
                if (!IsValid()) {
                    return "";
                }
                return _obj.name;
            }
        }

        public string DisplayDetailText {
            get {
                if (!IsValid()) {
                    return "";
                }
                return _obj.FullName();
            }
        }

        public abstract Texture2D DisplayIcon {
            get;
        }

        public bool IsValid() {
            return _obj != null;
        }

        public abstract void Execute();


        // PRAGMA MARK - Constructors
        public GameObjectCommand(GameObject obj) {
            _obj = obj;
        }


        // PRAGMA MARK - Internal
        protected GameObject _obj;
    }
}
{'fraction_non_alphanumeric': 0.06929637526652452, 'fraction_numerical': 0.0010660980810234541, 'mean_word_length': 1.2890243902439025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5991528', 'n_tokens_mistral': 478, 'n_tokens_neox': 444, 'n_words': 127}