mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Fix a reported NULL pointer dereference when exporting GL state to HTML
This commit is contained in:
@@ -2637,15 +2637,12 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Shad
|
||||
uint64_t byteSize = shaderCBuf.byteSize;
|
||||
|
||||
QString slotname = tr("Uniforms");
|
||||
QString name = m_Ctx.GetResourceName(b->resourceId);
|
||||
QString name = tr("Empty");
|
||||
QString sizestr = tr("%1 Variables").arg(numvars);
|
||||
QString byterange;
|
||||
|
||||
if(!filledSlot)
|
||||
{
|
||||
name = tr("Empty");
|
||||
length = 0;
|
||||
}
|
||||
|
||||
if(b)
|
||||
{
|
||||
@@ -2653,6 +2650,8 @@ void GLPipelineStateViewer::exportHTML(QXmlStreamWriter &xml, const GLPipe::Shad
|
||||
offset = b->byteOffset;
|
||||
length = b->byteSize;
|
||||
|
||||
name = m_Ctx.GetResourceName(b->resourceId);
|
||||
|
||||
BufferDescription *buf = m_Ctx.GetBuffer(b->resourceId);
|
||||
if(buf && length == 0)
|
||||
length = buf->length;
|
||||
|
||||
Reference in New Issue
Block a user