AnsweredAssumed Answered

pMarker not assigned a value?

Question asked by BrianJBaldwin on Apr 9, 2013
Latest reply on Apr 10, 2013 by BrianJBaldwin
Quick question.  I have some old code that I have brought over from VB Script and just wanted to see why this error is coming up.

Warning: Variable 'pMarker' is used before it has been assigned a value. A null reference exception could result at runtime.

From what I can see, I'm assigning a value in the Do Until there something I'm missing?

Dim pMarker As IMarkerSymbol         Do Until pStyleItem Is Nothing             If pStyleItem.Name = "Star 1" Then                 pMarker = pStyleItem.Item                 pMarker.Size = 12                 pMarker.Color = pColor                 Exit Do             End If             pStyleItem = pEnumMarkers.Next         Loop          Dim prenderer As ISimpleRenderer         prenderer = New SimpleRenderer         prenderer.Symbol = pMarker