diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-12 07:17:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-12 07:31:54 +0300 |
commit | ee01b660eb5b17aefdb9773fc1269934136f1d15 (patch) | |
tree | 08fb17af4f2407f61c3abaaa7711337b9afe73f0 /source/blender/editors/interface/interface.c | |
parent | 022ad416702dabb2086b587d04230dd078478c04 (diff) |
Fix use of uninitialized stack memory
The matrix multiply uses x,y values so both must be initialized.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index ffb13e9facf..e8c63fb0224 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -163,7 +163,9 @@ float ui_block_to_window_scale(const ARegion *ar, uiBlock *block) /* We could have function for this to avoid dummy arg. */ float dummy_x; float min_y = 0, max_y = 1; + dummy_x = 0.0f; ui_block_to_window_fl(ar, block, &dummy_x, &min_y); + dummy_x = 0.0f; ui_block_to_window_fl(ar, block, &dummy_x, &max_y); return max_y - min_y; } |