wg_engine: remove dead condition in target method

Remove redundant instance/device/target checks in the second condition, since they are already early-exited in the first condition.
This commit is contained in:
Jinny You 2025-06-14 04:56:29 +09:00 committed by Sergii Liebodkin
parent 482dd0e6f8
commit fd1ef5f7ec

View file

@ -368,8 +368,7 @@ bool WgRenderer::target(WGPUDevice device, WGPUInstance instance, void* target,
}
// can not initialize renderer, give up
if (!instance || !device || !target || !width || !height)
return false;
if (!width || !height) return false;
// device or instance was changed, need to recreate all instances
if ((mContext.device != device) || (mContext.instance != instance)) {