bitmap: handle dealloc on error and fix debug
bitmap: handle dealloc on error and fix debug

war2/war2edit,jeanguyomarch/war2edit,war2/war2edit,jeanguyomarch/war2edit,war2/war2edit,jeanguyomarch/war2edit