Evaluate the following limit:

$\lim \limits\_{x\to 0}\dfrac{2\cos ^{-3}x\cdot\sin x}{2\sin x+x\cdot \cos x}\color {\blue}{=}\lim \limits\_{x\to 0}\dfrac{2\cos ^{-3}x}{2++x\cdot \frac{\cos x}{\sin x}}$ but $$\lim \limits\_{x\to 0}x\cdot \frac{\cos x}{\sin x}=1$$ then $\lim \limits\_{x\to 0}\dfrac{2\cos ^{-3}x}{2++x\cdot \frac{\cos x}{\sin x}}=\frac{2}{3}.$ Right?

But I have one question. In the second equality I divide enumerator and denominator to $\sin x$. Does it legal? What about if $\sin x=0$? Can anyone explain it to me please?