This is a migrated thread and some comments may be shown as answers.

[Bug Report] Slot class implementation

1 Answer 44 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Denis
Top achievements
Rank 1
Denis asked on 21 Apr 2017, 02:34 AM

Hi,

I'm talking about class "Slot" in Telerik.Windows.Controls.ScheduleView namespace.

Let's take a look to Slot(IOccurrence occurence) constructor, line 14 may cause NullReferenceException:

01.public Slot(IOccurrence occurence) : base(occurence)
02.        {
03.            IAppointment appointment = occurence as IAppointment;
04.            if (appointment != null)
05.            {
06.                if (appointment.RecurrenceRule != null)
07.                {
08.                    this.RecurrencePattern = appointment.RecurrenceRule.Pattern;
09.                }
10.            }
11.            else
12.            {
13.                Occurrence occurrence = occurence as Occurrence;
14.                appointment = occurrence.Appointment;
15.                if (occurrence != null)
16.                {
17.                    appointment = occurrence.Appointment;
18.                }
19.            }
20.            this.TimeZone = appointment.TimeZone;
21.            this.Resources.AddRange(appointment.Resources);
22.        }

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 25 Apr 2017, 12:12 PM
Hello Denis,

You are correct - line 14 can be removed. We will fix that as soon as possible.

Thanks for your feedback - I updated your Telerik points.

Regards,
Kalin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ScheduleView
Asked by
Denis
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or