Do not draw a window with destroyed resources using a dangling reference.
This fixes issue #28 (closed) by doing two things:
- Resetting resource reference to 0 so that they can no longer be used after destruction.
- Do not redraw windows if their resources have been destroyed.