Fix crash when clicking empty canvas while loading.