<p dir="ltr"><br>
On 20/08/2014 5:29 pm, "kimaidou" <<a href="mailto:kimaidou@gmail.com">kimaidou@gmail.com</a>> wrote:<br>
><br>
> Nyal, <br>
><br>
> Thanks a lot, you find it !<br>
> When instantiating QgsMapSettings first, then use this object to instantiate QgsComposition, this works well with no segfault.</p>
<p dir="ltr">><br>
> 2014-08-19 22:48 GMT+02:00 Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>>:<br>
>> ><br>
>><br>
>> Does it make any difference if you change:<br>
>> c = QgsComposition(QgsMapSettings())<br>
>><br>
>> To:<br>
>> ms=QgsMapSettings()<br>
>> c=QgsComposition(ms)<br>
>><br>
>> ?<br></p>
<p dir="ltr">Martin/other python experts,</p>
<p dir="ltr">What's the best way to fix this? Is /Transfer/ appropriate, given that the c++ code would never delete this object? Or is there an alternative sip flag which is more appropriate for this?</p>
<p dir="ltr">Nyall</p>