Safety: prevent uninitialized variable use
Record change Fixes changelog
This commit is contained in:
parent
d14de8676b
commit
9188b14094
@ -13,6 +13,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
> - **Fixed**: for any bug fixes.
|
||||
> - **Security**: in case of vulnerabilities.
|
||||
|
||||
## [3.5.1] - ??
|
||||
|
||||
### Fixed
|
||||
|
||||
- Removes verbose debugging unintentionally left in the code.
|
||||
- kitchensink referenced by, but not included in binary is now included.
|
||||
- Safety check prevents uninitialized colorscheme registry use
|
||||
|
||||
## [3.5.0] - 2020-03-06
|
||||
|
||||
The version jump from 3.3.x is due to some work in the build automation that necessitated a number of bumps to test the build/release, and testing compiling plugins from github repositories.
|
||||
|
@ -9,6 +9,12 @@ import (
|
||||
|
||||
var registry map[string]Colorscheme
|
||||
|
||||
func init() {
|
||||
if registry == nil {
|
||||
registry = make(map[string]Colorscheme)
|
||||
}
|
||||
}
|
||||
|
||||
func FromName(confDir string, c string) (Colorscheme, error) {
|
||||
cs, ok := registry[c]
|
||||
if !ok {
|
||||
|
Loading…
x
Reference in New Issue
Block a user