RenderDummy::TextureStorage::texture_replace add missing null check

This commit is contained in:
dzil123 2022-11-18 22:02:47 -08:00
parent 84c404f6bc
commit 8000751d90

View file

@ -80,6 +80,7 @@ public:
virtual void texture_free(RID p_rid) override { virtual void texture_free(RID p_rid) override {
// delete the texture // delete the texture
DummyTexture *texture = texture_owner.get_or_null(p_rid); DummyTexture *texture = texture_owner.get_or_null(p_rid);
ERR_FAIL_COND(!texture);
texture_owner.free(p_rid); texture_owner.free(p_rid);
memdelete(texture); memdelete(texture);
}; };