[Qgis-developer] Re: dynamic_cast related to segfaults
Giuseppe Sucameli
brush.tyler at gmail.com
Fri May 28 07:17:07 EDT 2010
Hi Jef,
On Fri, May 28, 2010 at 1:09 PM, Jürgen E. <jef at norbit.de> wrote:
> > without any changes to that code, now QGis doesn't crash more if
> > I drop a layer in an invalid place.
>
> On Fri, 28. May 2010 at 11:28:45 +0200, Giuseppe Sucameli wrote:
> I don't think dynamic_cast on null pointers are bad. But all should be
> accompanied with a test for the result. In qgslegend there are several
> places
> where the result is not checked before dereferencing it. For instance line
> 266 and 326 - but not in your quoted code.
>
I agree with you, it's strange without dereferencing.
But I added some debug message to understand where QGis crashed and the
line was the same of the dynamic_cast.
BTW now works fine.
Cheers
--
Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100528/3e9330d9/attachment.html
More information about the Qgis-developer
mailing list