Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Voronchev <nikita.voronchev@ru.axxonsoft.com>2019-08-10 17:01:37 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-08-10 17:01:37 +0300
commit000430002a66abca2e02d0b40dfff2a23ff9b7ec (patch)
tree854ade3aa04854d4610c4cf8b60502971e743ff4 /mcs/class/System.Drawing.Design
parentb52830cf1120bdeaf693080e22b3af87e3aef9e8 (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.cs2
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)