The extension close functions are called before FreeAllResources. If DestroyWindow is unwrapped before FreeAllResources, this can lead to a dangling dbeWindow if the Window is freed before the dbeWindow is freed.
This also unwraps the DestroyWindow of any other extension that is initialized after dbe.
Avoid the use-after-free by unwrapping in CloseScreen instead of in the extension close function.
Signed-off-by: Peter Harris email@example.com