diff options
author | Nikita Voronchev <nikita.voronchev@ru.axxonsoft.com> | 2019-08-10 17:01:37 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-08-10 17:01:37 +0300 |
commit | 000430002a66abca2e02d0b40dfff2a23ff9b7ec (patch) | |
tree | 854ade3aa04854d4610c4cf8b60502971e743ff4 /mcs/class/System.Drawing.Design | |
parent | b52830cf1120bdeaf693080e22b3af87e3aef9e8 (diff) |
[System.Drawing.Design] Allow `context` be a null in the `ColorEditor.EditValue` (#16141)
If one call `ColorEditor.EditValue(IServiceProvider, Object)` ([MSDN](https://docs.microsoft.com/ru-ru/dotnet/api/system.drawing.design.uitypeeditor.editvalue?view=netframework-4.8#System_Drawing_Design_UITypeEditor_EditValue_System_IServiceProvider_System_Object_)), then `context` is `null` and drop-down menu doesn't appear.
Diffstat (limited to 'mcs/class/System.Drawing.Design')
-rw-r--r-- | mcs/class/System.Drawing.Design/System.Drawing.Design/ColorEditor.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/System.Drawing.Design/System.Drawing.Design/ColorEditor.cs b/mcs/class/System.Drawing.Design/System.Drawing.Design/ColorEditor.cs index 1f1f23ccccc..a9c1a993462 100644 --- a/mcs/class/System.Drawing.Design/System.Drawing.Design/ColorEditor.cs +++ b/mcs/class/System.Drawing.Design/System.Drawing.Design/ColorEditor.cs @@ -55,7 +55,7 @@ namespace System.Drawing.Design public override object EditValue (ITypeDescriptorContext context, IServiceProvider provider, object value) { - if (context != null && provider != null) { + if (provider != null) { editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (editorService != null) { if (editor_control == null) |