Răsfoiți Sursa

Change code

lindexi 7 ani în urmă
părinte
comite
31b88dc589
1 a modificat fișierele cu 1 adăugiri și 4 ștergeri
  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);
         }