gl4: fix nullptr dereference in GL4Shader::CompileProgram
A nullptr dereference will occur when the disassembly string is not found, which will obviously happen on AMD. Check for the condition and if it is not found, put a message indicating so.
This commit is contained in:
parent
48ed0cb903
commit
1139a1b6ac
|
@ -424,7 +424,11 @@ bool GL4Shader::CompileProgram(std::string source) {
|
|||
search_offset = p - search_start;
|
||||
++search_offset;
|
||||
}
|
||||
if (disasm_start) {
|
||||
host_disassembly_ = std::string(disasm_start);
|
||||
} else {
|
||||
host_disassembly_ = std::string("Shader disassembly not available.");
|
||||
}
|
||||
|
||||
// Append to shader dump.
|
||||
if (FLAGS_dump_shaders.size()) {
|
||||
|
|
Loading…
Reference in New Issue