You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BUGFIX] QgsMSLayerCache: remove layer from QgsMapLayerRegistry before delete it
In QGIS Server, layers can be added to QgsMapLayerRegistry and delete by QgsMSLayerCache. This means that QgsMapLayerRegistry can have reference to deleted pointers.
Another approach would be to connect to QgsMapLayer::destroyed when adding a layer to QgsMapLayerRegistry. That would avoid ever ending up in that situation regardless of the context.
Not sure if there's also a drawback to that.
2 commit comments
m-kuhn commentedon Jun 28, 2016
Another approach would be to connect to QgsMapLayer::destroyed when adding a layer to QgsMapLayerRegistry. That would avoid ever ending up in that situation regardless of the context.
Not sure if there's also a drawback to that.
rldhont commentedon Jun 29, 2016
I have tested to remove references on QgsMapLayer::destroyed but it doesn't work and segfault QGIS.