<div dir="ltr"><div><br>> > line 175>>  if assigned(AGraphic) then AGraphic.Free;</div>
<div>This is not the problem, the problem is the fact that this code never executed:</div>
<div>         if assigned(gc) then<br>           begin<br>           AGraphic := gc.Create;<br>           AGraphic.LoadFromStream(s);</div>
<div>           Picture.Assign(AGraphic);<br>           end;</div>
<div> </div>
<div>Perhaps the problem is in :</div>
<div>FDataLink.DataSet.CreateBlobStream(FDataLink.Field,bmRead); // (lazarus team)</div>
<div>or</div>
<div>s.readansistring; (please, see original code)<br></div>
<div class="gmail_quote">2008/9/4 Burkhard Carstens <span dir="ltr"><<a href="mailto:fpc@bcsoft.de">fpc@bcsoft.de</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Am Mittwoch, 3. September 2008 19:56 schrieb Osvaldo Filho:<br>[..]<br>
<div class="Ih2E3d">> > The AV ocour here:<br>> > dbimage.inc line 175<br>> > ----------------------<br>> >            Picture.Assign(AGraphic);<br>> >            end;<br>> >        finally<br>
> > line 175>>  if assigned(AGraphic) then AGraphic.Free;<br>> >          s.Free;<br>> >        end {try}<br>> > ----------------------<br><br></div>I didn't read the whole thread but one thing comes to mind: AGraphics is<br>
a local var, so it is not initialized (IIRC). Therefore<br>assigned(AGraphics) (which just checks for non-nil pointer) returns<br>probably true, even if it does not point to TGraphic instance. Just<br>adding "AGraphics:=nil" at the beginning of the procedure might resolve<br>
the issue.<br><br>regards<br><font color="#888888"> Burkhard<br></font>
<div>
<div></div>
<div class="Wj3C7c"><br>_______________________________________________<br>Lazarus mailing list<br><a href="mailto:Lazarus@lazarus.freepascal.org">Lazarus@lazarus.freepascal.org</a><br><a href="http://www.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://www.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</div></div></blockquote></div><br></div>