diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-02-26 00:44:16 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-02-26 00:48:53 +0300 |
commit | f1b5b97bed35bba7b0955d4255792c22f3de9eb3 (patch) | |
tree | e9449e1ae32489fa036dc5dbb9652d68f0efa7c4 /source/blender/blenkernel | |
parent | ef7791ff20b44ec8228e66e6e905f1ad916b1d82 (diff) |
Fix T47559: Crash when scrubbing in time on a OpenVDB Smoke.
Cache reading was not using the right simulation flags (outdated), which
made it lookup non-existent grids, and crash on de-referencing null
pointers.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 4de924e954f..c8a42d81f1d 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1110,12 +1110,12 @@ static int ptcache_smoke_openvdb_read(struct OpenVDBReader *reader, void *smoke_ const char *name = (!sds->wt) ? "density" : "density low"; OpenVDB_import_grid_fl(reader, name, &dens, sds->res); - if (fluid_fields & SM_ACTIVE_HEAT) { + if (cache_fields & SM_ACTIVE_HEAT) { OpenVDB_import_grid_fl(reader, "heat", &heat, sds->res); OpenVDB_import_grid_fl(reader, "heat old", &heatold, sds->res); } - if (fluid_fields & SM_ACTIVE_FIRE) { + if (cache_fields & SM_ACTIVE_FIRE) { name = (!sds->wt) ? "flame" : "flame low"; OpenVDB_import_grid_fl(reader, name, &flame, sds->res); name = (!sds->wt) ? "fuel" : "fuel low"; @@ -1124,7 +1124,7 @@ static int ptcache_smoke_openvdb_read(struct OpenVDBReader *reader, void *smoke_ OpenVDB_import_grid_fl(reader, name, &react, sds->res); } - if (fluid_fields & SM_ACTIVE_COLORS) { + if (cache_fields & SM_ACTIVE_COLORS) { name = (!sds->wt) ? "color" : "color low"; OpenVDB_import_grid_vec(reader, name, &r, &g, &b, sds->res); } |