Mouse pointer hidden on screen

Hi all,

In my code after doing some operation script should display a dialog.
Everything OK, but some times mouse pointer became invisible on screen – it looks like a one pixel point so its impossible to choose appropriate button
What’s the matter?