Page MenuHome

Fix T75096: Crash when using liquid simulation as dynamic paint brush
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on May 27 2020, 2:23 PM.

Details

Summary

This adds some bounds checking. It fixes the crash for me. I have no
idea of the real bug is earlier in the code... Maybe someone else
knows the code a bit better.

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.May 27 2020, 2:23 PM
Jacques Lucke (JacquesLucke) created this revision.

Not really my area, but there are reasonable amount of places where code compares tri_index to -1.

So one thing i would do in this patch is to compare to -1 rather than to be equal or greater than 0 (to match other checks in the code).
Whether or not all the usages of tri_index needs check I don't know since some of the checks might be already done in the parent scopes.

Comparing to -1 sounds like a good idea.

Some picky stuff. Otherwise LGTM.

source/blender/blenkernel/intern/dynamicpaint.c
2704

const.

This revision is now accepted and ready to land.May 27 2020, 3:40 PM