diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-16 01:40:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-16 01:43:07 +0300 |
commit | f06a6e92bc5ee8f77ee9fedd77c7c307964bc708 (patch) | |
tree | 652460025f7c69ce9c01c66c521037f8eee6ae4b /source | |
parent | ac1dcdbf0665612fa38346388b6bc62c23906903 (diff) |
Cleanup: misleading memset use
This call to memset relied on PassList having a single,
zero sized struct member.
Pass the passes array instead for readability.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_viewport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index a3ee2d11e56..8ccfa3d9898 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -658,7 +658,7 @@ static void gpu_viewport_storage_free(StorageList *stl, int stl_len) static void gpu_viewport_passes_free(PassList *psl, int psl_len) { - memset(psl, 0, sizeof(struct DRWPass *) * psl_len); + memset(psl->passes, 0, sizeof(*psl->passes) * psl_len); } /* Must be executed inside Drawmanager Opengl Context. */ |