how can i close an open subwindow in glut?

i open a subwindow by glutCreateWindow();
and when i close him by hand , the application terminates.

how can i solve the problem ?

Have you tired glutDestroyWindow?

Originally posted by pavelk:
[b]i open a subwindow by glutCreateWindow();
and when i close him by hand , the application terminates.

how can i solve the problem ? [/b]