Browse Source

RenderDummy::TextureStorage::texture_replace add missing null check

dzil123 2 năm trước cách đây
mục cha
commit
8000751d90
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      servers/rendering/dummy/storage/texture_storage.h

+ 1 - 0
servers/rendering/dummy/storage/texture_storage.h

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