Skip to content
Permalink
Browse files

Fix crash on invalid assert in rule-based labeling

  • Loading branch information
wonder-sk committed Apr 15, 2016
1 parent 77d95b0 commit a64ea0b0bea2d7e887a1be22408e9536c9d3f4a4
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsrulebasedlabeling.cpp
@@ -222,7 +222,7 @@ void QgsRuleBasedLabeling::Rule::createSubProviders( QgsVectorLayer* layer, QgsR
{
// add provider!
QgsVectorLayerLabelProvider *p = provider->createProvider( layer, false, mSettings );
delete subProviders.value( this, nullptr );
Q_ASSERT( !subProviders.contains( this ) );
subProviders[this] = p;
}

4 comments on commit a64ea0b

@nyalldawson

This comment has been minimized.

Copy link
Collaborator

@nyalldawson nyalldawson replied Apr 27, 2016

@wonder-sk is this commit message correct?

@jef-n

This comment has been minimized.

Copy link
Member

@jef-n jef-n replied Apr 27, 2016

This is called from the dxf export to replace the vector label providers with dxf label providers. I guess this breaks that.

@wonder-sk

This comment has been minimized.

Copy link
Member Author

@wonder-sk wonder-sk replied Apr 27, 2016

Hmmm the original commit mainly contained removal of the Q_ASSERT @nyalldawson removed in the meanwhile (was crashing rule-based labeling in normal cases), so after rebase the "main" change in the commit was gone.

I do not remember anymore what was the rationale for this other change... if it breaks DXF export I will revert it then...

@jef-n

This comment has been minimized.

Copy link
Member

@jef-n jef-n replied Apr 28, 2016

reverted in d69910a. It didn't crash as expected on windows though - unexpectedly Q_ASSERT is a noop in RelWithDebInfo.

Please sign in to comment.
You can’t perform that action at this time.