fixed crash with "autotest" due to clearing undefined bitmap rectangle