mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
fix: attempt to catch a null ref happening in the Route Descriptor
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using PepperDash.Core;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
@@ -33,6 +32,11 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <param name="descriptor"></param>
|
/// <param name="descriptor"></param>
|
||||||
public void AddRouteDescriptor(RouteDescriptor descriptor)
|
public void AddRouteDescriptor(RouteDescriptor descriptor)
|
||||||
{
|
{
|
||||||
|
if (descriptor == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (RouteDescriptors.Any(t => t.Destination == descriptor.Destination))
|
if (RouteDescriptors.Any(t => t.Destination == descriptor.Destination))
|
||||||
{
|
{
|
||||||
Debug.LogMessage(LogEventLevel.Debug, descriptor.Destination,
|
Debug.LogMessage(LogEventLevel.Debug, descriptor.Destination,
|
||||||
|
|||||||
Reference in New Issue
Block a user