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(); }