Fix removing OSWindow breaking pointer references in glfw

This commit is contained in:
Kovid Goyal
2017-11-16 16:39:54 +05:30
parent 528573ac80
commit c4bcda80e9
3 changed files with 3 additions and 6 deletions

View File

@@ -182,7 +182,6 @@ bool
remove_os_window(id_type os_window_id) {
bool found = false;
WITH_OS_WINDOW(os_window_id)
remove_os_window_reference(os_window);
found = true;
make_os_window_context_current(os_window);
END_WITH_OS_WINDOW
@@ -190,6 +189,7 @@ remove_os_window(id_type os_window_id) {
WITH_OS_WINDOW_REFS
REMOVER(global_state.os_windows, os_window_id, global_state.num_os_windows, OSWindow, destroy_os_window_item, global_state.capacity);
END_WITH_OS_WINDOW_REFS
update_os_window_references();
}
return found;
}