[Bug Report] Slot class implementation

2 posts, 0 answers
  1. Denis
    Denis avatar
    2 posts
    Member since:
    Aug 2015

    Posted 20 Apr Link to this post

    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.        }
  2. Kalin
    Admin
    Kalin avatar
    1279 posts

    Posted 25 Apr Link to this post

    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.
Back to Top