forked from bartvdbraak/blender
GPU: Avoid access violation while reading the pass->shader
.
This commit is contained in:
parent
6ad91be5d7
commit
2ba35ea7c2
@ -1978,14 +1978,14 @@ void GPU_pass_compile(GPUPass *pass, const char *shname)
|
||||
}
|
||||
pass->shader = NULL;
|
||||
}
|
||||
pass->compiled = true;
|
||||
|
||||
if (!BLI_thread_is_main()) {
|
||||
else if (!BLI_thread_is_main()) {
|
||||
/* For some drivers, you must use the program at least once in the
|
||||
* rendering context that it is created. */
|
||||
glUseProgram(GPU_shader_get_program(pass->shader));
|
||||
glUseProgram(0);
|
||||
}
|
||||
|
||||
pass->compiled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user