loader: free error state, when checking the drawable type