Hi all, <br>without any changes to that code, now QGis doesn&#39;t crash more if <br>I drop a layer in an invalid place.<br><br>I don&#39;t know if it was due to a bad compilation, but I&#39;m sure <br>I compiled and recompiled QGis while I was searching for the error.<br>

<br>Cheers.<br><br><div class="gmail_quote">On Thu, May 27, 2010 at 1:30 PM, Giuseppe Sucameli <span dir="ltr">&lt;<a href="mailto:brush.tyler@gmail.com">brush.tyler@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi guys, <br>while I wrote a patch for QgsLegend, I found an issue related with <br>segmentation faults.<br><br>Here the bugged code:<br><br>QTreeWidgetItem* destItem = mDropTarget;<br>...<br>QgsLegendItem* dest = dynamic_cast&lt;QgsLegendItem *&gt;( destItem );<br>


<br>If mDropTarget is NULL QGis crashes with segfault. <br>In this case the problem is the dynamic_cast, used without make a null test on destItem. <br><br>May  some other crashes be due  to a code like this??<br><br>Cheers.<br clear="all">


<br>-- <br><font color="#888888">Giuseppe Sucameli<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Giuseppe Sucameli<br>