mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 12:34:30 +00:00
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:
parent
482dd0e6f8
commit
fd1ef5f7ec
1 changed files with 1 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue