mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-04 04:37:55 +03:00
Fixed crash when using autofocus DOF and chara isn't present
This commit is contained in:
@@ -93,10 +93,10 @@ void post_process_dof::apply(RenderTexture* rt, RenderTexture* buf, GLuint* samp
|
||||
rob_chara* rob_chr = 0;
|
||||
for (int32_t i = 0; i < ROB_CHARA_COUNT; i++) {
|
||||
rob_chara* rob_chr = rob_chara_array_get(i);
|
||||
if (!rob_chr->is_visible())
|
||||
if (!rob_chr || !rob_chr->is_visible())
|
||||
continue;
|
||||
|
||||
mat4 mat = rob_chr->data.field_1E68.field_78[4]; // sub_1405163C0
|
||||
const mat4& mat = rob_chr->data.field_1E68.field_78[4]; // sub_1405163C0
|
||||
|
||||
vec3 chara_trans = 0.0f;
|
||||
mat4_get_translation(&mat, &chara_trans);
|
||||
|
||||
Reference in New Issue
Block a user