help in draw polygon with PtPolygon

in my program,i use the PtPolygon to display some curves, when i want to show the curve, i set points of the PtPolygon,the create it, when i want to show another curve,i destroy the widget,then set the new resource of the PtPolygon,the problem is ,sometimes, when i create the PtPolygon using the point data(get from some sensor), the Photon GUI crashed, the mouse pointer losted, any keyboard input has no response, is some one had encountered such problem?
i guess if i gave the disproper point value to the PtPolygon,but in documents, there is no limitation on the point value, so i confused
Is someone can help me?

You don’t need to destroy the widget just to set the new resource. I’m guessing something is wrong with the way you create/set resource/destroy the widget.

You should post some failing sample code so we can see what you are doing.