Commit b012311
Gani Aliguzhinov
Adding boneMatrices to MeshUnmanaged to fix double free
I noticed a bug when trying out the models_first_person_maze
example, that sometimes a double free occurs on UnloadMesh
when destructor of MeshUnmanaged is called. The offending line
is Line 1935 from rmodels.c from raylib, where
RL_FREE(mesh.boneMatrices) is called. To remedy this, I added
a default assignment of nullptr to boneMatrices and explicit
assignment throught the set method.1 parent 6d9d02c commit b012311
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| 247 | + | |
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
| |||
0 commit comments