fix a bug, discard object before CreateRenderTarget

This commit is contained in:
hyzboy 2020-10-17 16:26:53 +08:00
parent 834b737e1a
commit 03354c62b9

View File

@ -53,9 +53,10 @@ RenderTarget *Device::CreateRenderTarget( const uint w,const uint h,
if(cb)
{
color_texture_list.DiscardObject();
RenderTarget *rt=new RenderTarget(this,fb,cb,color_texture_list,color_count,depth_texture,fence_count);
return(new RenderTarget(this,fb,cb,color_texture_list,color_count,depth_texture,fence_count));
color_texture_list.DiscardObject();
return rt;
}
}