diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-02-20 09:17:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-02-20 09:18:41 +0300 |
commit | 919e38cfc800fa2ee148e9b4ea8e2e56f4bc08b6 (patch) | |
tree | e2b1c3ff23549f07590a83819256933bd577403b /source/blender/gpu | |
parent | 1ec83f41c1be97e757ebdca357b39ee0cca240c1 (diff) |
Fix for unlikely NULL pointer dereference
Potential crash reading freestyle modifiers from future blend-files
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_compositing.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c index 89fa1a599c2..e0a55b21921 100644 --- a/source/blender/gpu/intern/gpu_compositing.c +++ b/source/blender/gpu/intern/gpu_compositing.c @@ -267,7 +267,7 @@ bool GPU_fx_compositor_initialize_passes( int w = BLI_rcti_size_x(rect), h = BLI_rcti_size_y(rect); char err_out[256]; int num_passes = 0; - char fx_flag = fx_settings->fx_flag; + char fx_flag; fx->effects = 0; @@ -276,6 +276,8 @@ bool GPU_fx_compositor_initialize_passes( return false; } + fx_flag = fx_settings->fx_flag; + /* disable effects if no options passed for them */ if (!fx_settings->dof) { fx_flag &= ~GPU_FX_FLAG_DOF; |