Let $X$ be a smooth complex projective variety of dimension $n$ and $D$ a normal crossings divisor. I know that the following holds: $$ \mathrm{deg}\ c_n(\Omega^1_X(\log D))=(-1)^n \chi(U), $$ where $U$ denotes $X-D$.

I would like to know if the following very easy proof is correct in the case where $D=\mathbb{P}^1$ and $D$ is a finite set of at least two points containing $\infty$. Let $D=\{\infty, x_1, \ldots, x_r\}$. Then $\chi(U)=1-r$.

If I follow the recipe to compute the Chern class I have to choose a non-zero rational section of $\Omega^1_{\mathbb{P}^1}(\log D)$ and compute its divisor. In this case I can choose the global section $$ \omega=\sum_{i=1}^r \frac{dx}{x-x_i}=\frac{\sum_{i=1}^r \prod_{j \neq i} (x-x_i)dx}{\prod_{i=1}^r (x-x_i)}=\frac{\prod_{i=1}^{r-1} (x-\alpha_i)dx}{\prod_{i=1}^r (x-x_i)}. $$ Then $$ c_1(\Omega^1_X(\log D))=\mathrm{div}(\omega)=\sum_{i=1}^{r-1} (\alpha_i), $$ so the degree is $r-1=-\chi(U)$ as we wanted.

Is this correct?