[2.1] D3D11 RS can crash with profiling enabled (with patch) Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
rujialiu
Goblin
Posts: 296
Joined: Mon May 09, 2016 8:21 am
x 35

[2.1] D3D11 RS can crash with profiling enabled (with patch)

Post by rujialiu »

Hi!

When profiling enabled, D3D11 RS crashed in TransferOwnership() in some of our clients, because when QueryInterface(ID3DUserDefinedAnnotation) failed, the current code did not check hr, dereferencing null. Here is a quick fix:

Code: Select all

            hr = mImmediateContext->QueryInterface(__uuidof(ID3DUserDefinedAnnotation), (LPVOID*)&mPerf);
            if (!SUCCEEDED(hr) || !mPerf->GetStatus()) {
                SAFE_RELEASE(mPerf);
            }
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.1] D3D11 RS can crash with profiling enabled (with patch)

Post by dark_sylinc »

Post Reply