baweja's picture

GLControl's WindowInfo property can return null if the control has not been created yet

Project:The Open Toolkit library
Version:1.0.0-rc1
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:open
Description

In my usage of GLControl I have modified the implementation of WindowInfo property of the GLControl as follows:

///
/// Gets the for this instance.
///
public IWindowInfo WindowInfo
{
get { return Implementation.WindowInfo; }
}

The original code was the following line

get { return implementation.WindowInfo; }

using the "Implementation" property instead of "implementation" member ensures that control state is validated and the window (control) has been created.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

#1

There is a slight chance that this is so due to the possibility of infinite recursion (but I don't remember off-hand). Will have to check, thanks.