Skip to content

Commit

Permalink
Fix crash on invalid assert in rule-based labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Apr 27, 2016
1 parent 77d95b0 commit a64ea0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsrulebasedlabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

4 comments on commit a64ea0b

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wonder-sk is this commit message correct?

@jef-n
Copy link
Member

@jef-n jef-n commented on a64ea0b Apr 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@wonder-sk
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

@jef-n jef-n commented on a64ea0b Apr 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.