Index: src/plugins/diagram_overlay/qgswkndiagramfactorywidget.cpp =================================================================== --- src/plugins/diagram_overlay/qgswkndiagramfactorywidget.cpp (revision 13891) +++ src/plugins/diagram_overlay/qgswkndiagramfactorywidget.cpp (working copy) @@ -125,6 +125,14 @@ //text QString currentText = mAttributesComboBox->currentText(); + + // Check for null and empty string, and then skip the rest of this stuff. + if( currentText.isNull() || currentText.isEmpty() ) + { + delete newItem; + return; + } + newItem->setText( 0, currentText ); //and icon @@ -134,10 +142,7 @@ QColor randomColor( red, green, blue ); newItem->setBackground( 1, QBrush( randomColor ) ); - if ( !currentText.isNull() && !currentText.isEmpty() ) - { - mAttributesTreeWidget->addTopLevelItem( newItem ); - } + mAttributesTreeWidget->addTopLevelItem( newItem ); } void QgsWKNDiagramFactoryWidget::removeAttribute() Index: src/core/qgsvectorlayer.cpp =================================================================== --- src/core/qgsvectorlayer.cpp (revision 13891) +++ src/core/qgsvectorlayer.cpp (working copy) @@ -1,6 +1,6 @@ /*************************************************************************** + This class implements a generic means to display vector layers. The features qgsvectorlayer.cpp - This class implements a generic means to display vector layers. The features and attributes are read from the data store using a "data provider" plugin. QgsVectorLayer can be used with any data store for which an appropriate plugin is available. Index: src/core/qgsvectoroverlay.h =================================================================== --- src/core/qgsvectoroverlay.h (revision 13891) +++ src/core/qgsvectoroverlay.h (working copy) @@ -25,7 +25,7 @@ class QgsRect; class QgsRenderContext; -/**Base class for vector layer overlays (e.g. Diagrams, labels, etc.). For each object, the position of the bounding box is *stored in a QgsOberlayObject. The vector overlays are drawn on top of all layers +/**Base class for vector layer overlays (e.g. Diagrams, labels, etc.). For each object, the position of the bounding box is *stored in a QgsOverlayObject. The vector overlays are drawn on top of all layers * \note This class has been added in version 1.1 */ class CORE_EXPORT QgsVectorOverlay