Skip to content

Commit

Permalink
[host] dxgi: fix crash during init due to out of order accesses
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Apr 4, 2024
1 parent 23b773a commit ecd3692
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions host/platform/Windows/capture/DXGI/src/pp/sdrwhitelevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ static bool sdrWhiteLevel_setup(
this.context = context;
this.shareable = shareable;

comRef_initGlobalScope(10, this.comScope);
comRef_scopePush(10);
comRef_initGlobalScope(11, this.comScope);
comRef_scopePush(11);

comRef_defineLocal(IDXGIOutput6, output6);
status = IDXGIOutput_QueryInterface(
Expand Down Expand Up @@ -174,11 +174,12 @@ static bool sdrWhiteLevel_setup(
goto exit;
}

comRef_toGlobal(this.sampler, sampler);
comRef_toGlobal(this.buffer , buffer );

updateConsts();
DEBUG_INFO("SDR White Level : %f" , this.sdrWhiteLevel);

comRef_toGlobal(this.sampler, sampler);
comRef_toGlobal(this.buffer , buffer );
result = true;

exit:
Expand Down

0 comments on commit ecd3692

Please sign in to comment.