Fix openGL resource leakage on destruction of small color selector
The textures cannot be released without making the context current