mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
null checks
This commit is contained in:
@@ -48,6 +48,16 @@ namespace FancyZonesEditor
|
|||||||
|
|
||||||
public void CalcAdjacentZones(int index, int size, List<RowColInfo> info, Func<int, bool> indexCmpr)
|
public void CalcAdjacentZones(int index, int size, List<RowColInfo> info, Func<int, bool> indexCmpr)
|
||||||
{
|
{
|
||||||
|
if (info == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(info));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (indexCmpr == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(indexCmpr));
|
||||||
|
}
|
||||||
|
|
||||||
int ind = index;
|
int ind = index;
|
||||||
while (ind > 0 && indexCmpr(ind))
|
while (ind > 0 && indexCmpr(ind))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user