Skip to content

Commit 45538df

Browse files
committed
Fix a memory leak
1 parent fe800e2 commit 45538df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/annotations/qgstextannotation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ QgsTextAnnotation *QgsTextAnnotation::clone() const
3030
{
3131
std::unique_ptr< QgsTextAnnotation > c( new QgsTextAnnotation() );
3232
copyCommonProperties( c.get() );
33-
c->setDocument( mDocument ? mDocument->clone() : nullptr );
33+
c->setDocument( mDocument.get() );
3434
return c.release();
3535
}
3636

0 commit comments

Comments
 (0)