1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Null protection in IsInstanceOf

This commit is contained in:
Brian Fiete 2021-11-02 09:57:16 -07:00
parent da428d2c50
commit eb55b2d731

View file

@ -1966,7 +1966,7 @@ public:
void Dispose(); void Dispose();
void ReleaseData(); void ReleaseData();
virtual bool IsInstanceOf(BfTypeDef* typeDef) override { return typeDef->GetDefinition() == mTypeDef->GetDefinition(); } virtual bool IsInstanceOf(BfTypeDef* typeDef) override { if (typeDef == NULL) return false; return typeDef->GetDefinition() == mTypeDef->GetDefinition(); }
virtual BfModule* GetModule() override { return mModule; } virtual BfModule* GetModule() override { return mModule; }
virtual BfTypeInstance* ToTypeInstance() override { return this; } virtual BfTypeInstance* ToTypeInstance() override { return this; }
virtual bool IsDependentOnUnderlyingType() override { return true; } virtual bool IsDependentOnUnderlyingType() override { return true; }