Cleanup: quiet uninitialized warning

It's possible for the value to be uninitialized
in the case of loading newer preferences into an older Blender.
This commit is contained in:
Campbell Barton 2020-05-21 15:57:46 +10:00
parent b4a6418e2b
commit f66bfb5a86
1 changed files with 4 additions and 3 deletions

View File

@ -71,15 +71,16 @@ void OVERLAY_background_cache_init(OVERLAY_Data *vedata)
}
else {
switch (UI_GetThemeValue(TH_BACKGROUND_TYPE)) {
case TH_BACKGROUND_SINGLE_COLOR:
background_type = BG_SOLID;
break;
case TH_BACKGROUND_GRADIENT_LINEAR:
background_type = BG_GRADIENT;
break;
case TH_BACKGROUND_GRADIENT_RADIAL:
background_type = BG_RADIAL;
break;
default:
case TH_BACKGROUND_SINGLE_COLOR:
background_type = BG_SOLID;
break;
}
}