Browse Source

Code cleanup.

Tig 4 weeks ago
parent
commit
bc48545da0

+ 2 - 0
Terminal.Gui/Drawing/Region.cs

@@ -917,6 +917,8 @@ public class Region
     /// </param>
     /// </param>
     public void FillRectangles (IDriver? driver, Attribute? attribute, Rune? fillRune = null)
     public void FillRectangles (IDriver? driver, Attribute? attribute, Rune? fillRune = null)
     {
     {
+        ArgumentNullException.ThrowIfNull (driver);
+
         if (_rectangles.Count == 0)
         if (_rectangles.Count == 0)
         {
         {
             return;
             return;

+ 1 - 0
Terminal.Gui/Drawing/Ruler.cs

@@ -26,6 +26,7 @@ internal class Ruler
     public void Draw (IDriver? driver, Point location, int start = 0)
     public void Draw (IDriver? driver, Point location, int start = 0)
     {
     {
         ArgumentNullException.ThrowIfNull (driver);
         ArgumentNullException.ThrowIfNull (driver);
+
         if (start < 0)
         if (start < 0)
         {
         {
             throw new ArgumentException ("start must be greater than or equal to 0");
             throw new ArgumentException ("start must be greater than or equal to 0");

+ 2 - 0
Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs

@@ -16,6 +16,8 @@ public class SixelSupportDetector ()
     /// <param name="driver"></param>
     /// <param name="driver"></param>
     public SixelSupportDetector (IDriver? driver) : this ()
     public SixelSupportDetector (IDriver? driver) : this ()
     {
     {
+        ArgumentNullException.ThrowIfNull (driver);
+
         _driver = driver;
         _driver = driver;
     }
     }