From 3e9def95973baed3aabacc339f6c478508999f9d Mon Sep 17 00:00:00 2001 From: shadowik Date: Sun, 11 Dec 2022 22:51:28 +0400 Subject: [PATCH] Fix --- DoubleDeckerBus/DoubleDeckerBus/DrawingObjectBus.cs | 5 +++++ DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DoubleDeckerBus/DoubleDeckerBus/DrawingObjectBus.cs b/DoubleDeckerBus/DoubleDeckerBus/DrawingObjectBus.cs index 25c0020..f881878 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/DrawingObjectBus.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/DrawingObjectBus.cs @@ -56,5 +56,10 @@ namespace DoubleDeckerBus { return new DrawingObjectBus(data.CreateDrawningCar()); } + + public DrawingBus getBus() + { + return _bus; + } } } diff --git a/DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs b/DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs index 32625aa..d934c26 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs @@ -31,7 +31,7 @@ namespace DoubleDeckerBus { try { - if (bus.getBus(bus.Get_bus()) == null) + if (bus.getBus() == null) { throw new NullReferenceException(); }