- GLint attribute_v_coord = fgStructure.CurrentWindow->Window.attribute_v_coord;
- GLint attribute_v_normal = fgStructure.CurrentWindow->Window.attribute_v_normal;
- GLint attribute_v_texture = fgStructure.CurrentWindow->Window.attribute_v_texture;
+ GLint attribute_v_coord, attribute_v_normal, attribute_v_texture;
+ SFG_Window *win = fgStructure.CurrentWindow;
+ if(win) {
+ attribute_v_coord = win->Window.attribute_v_coord;
+ attribute_v_normal = win->Window.attribute_v_normal;
+ attribute_v_texture = win->Window.attribute_v_texture;
+ } else {
+ attribute_v_coord = attribute_v_normal = attribute_v_texture = -1;
+ }