-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bugfix] Crash when exporting (invalid) legend to qlr #7195
Conversation
Fixes qgis#18981 Save QLR crashes QGIS 3 This patch definitely prevents the crash but I'm not sure if we should also introduce the same check in QgsLayerTree::isLayer or even in QgsLayerTreeGroup::findLayers() or also when importing a qlr that might lead to invalid layer (like in this bug report).
I think this fix is good, but I'd also like to see the check be done in QgsLayerTreeGroup::findLayers() in case this bug may be present elsewhere. |
@elpaso , commit 2f2221a led to this regression: https://issues.qgis.org/issues/19199 |
Thanks. I'll have a look ASAP |
@elpaso , should we revert for now (to avoid shipping 3.2 with this regression), or will you be able to address this prior to June 22? :) |
I should make it in time. BTW my commit fixed a crash and this is not. |
@nirvn Is should be fixed in current master. |
@elpaso , that was fast :) cheers. Is there a way to add a test to safeguard the code from this specific regression? |
The regression was caused by the commit that you bisected. For now I just reverted the offending commit and the regression is gone, the original bug targeted by this PR was indeed already fixed by my first commit: ec909b0 |
Fixes #18981 Save QLR crashes QGIS 3
This patch definitely prevents the crash but I'm not sure if
we should also introduce the same check in QgsLayerTree::isLayer
or even in QgsLayerTreeGroup::findLayers() or also when importing
a qlr that might lead to invalid layer (like in this
bug report).