lindexi 7 vuotta sitten
vanhempi
sitoutus
31b88dc589
1 muutettua tiedostoa jossa 1 lisäystä ja 4 poistoa
  1. 1 4
      src/Windows/Avalonia.Direct2D1/PrimitiveExtensions.cs

+ 1 - 4
src/Windows/Avalonia.Direct2D1/PrimitiveExtensions.cs

@@ -136,10 +136,7 @@ namespace Avalonia.Direct2D1
             }
 
             //If we don't enter the code above that it is null. We should set it a default value to solve the null exception.
-            if (dashes == null)
-            {
-                dashes = new float[0];
-            }
+            dashes = dashes ?? Array.Empty<float>();
 
             return new StrokeStyle(factory, properties, dashes);
         }