When I run the EGL/WEL example program "simple_red_box" and want to close
the window, I click on the "cross" icon on the right top of the window, I get
an precondition violation in OPENGL_RENDERING_CONTEXT "delete" (is_current).
Explanation: The MAIN_WINDOW class of the program was buggy:
1. It redefined "on_wm_destroy" instead of "on_destroy" and also contained a
call to "destroy" which caused recursive invocation of "on_wm_destroy".
2. It did a "make_current" on an already current OPENGL_RENDERING_CONTEXT.
1. Ensure that it is the feature "on_destroy" that is redefined.
2. Do not call destroy (the window is already being destroyed!).
3. Do not call "make current" on an already current OPENGL_RENDERING_CONTEXT.
This example program only runs one thread and there is no reason to set
the OPENGL_RENDERING_CONTEXT to current after this is done in the initial
call to "on_show". The feature "make_current" now has a precondition stating
that it can't already be current when a call to "make_current" is done.