Skip to content
Permalink
Browse files

Coverity null deference fixes

  • Loading branch information
nyalldawson committed Aug 28, 2015
1 parent ac6c324 commit 40f4f20d08245e3a9885ad6c0e706f3eac17c1ae
@@ -79,7 +79,7 @@ void QgsMapToolAddCircularString::keyPressEvent( QKeyEvent* e )

void QgsMapToolAddCircularString::keyReleaseEvent( QKeyEvent* e )
{
if ( e->isAutoRepeat() )
if ( e && e->isAutoRepeat() )
{
return;
}
@@ -838,7 +838,7 @@ QgsExpressionContext QgsAtlasComposition::createExpressionContext()
expressionContext << new QgsExpressionContextScope( "Atlas" );
if ( mCoverageLayer )
expressionContext.lastScope()->setFields( mCoverageLayer->fields() );
if ( mComposition->atlasMode() != QgsComposition::AtlasOff )
if ( mComposition && mComposition->atlasMode() != QgsComposition::AtlasOff )
expressionContext.lastScope()->setFeature( mCurrentFeature );

return expressionContext;
@@ -396,7 +396,7 @@ bool QgsComposerAttributeTable::getFeatureAttributes( QList<QgsAttributeMap> &at
if ( mComposerMap && mShowOnlyVisibleFeatures )
{
selectionRect = *mComposerMap->currentMapExtent();
if ( mVectorLayer && mComposition->mapSettings().hasCrsTransformEnabled() )
if ( mComposition->mapSettings().hasCrsTransformEnabled() )
{
//transform back to layer CRS
QgsCoordinateTransform coordTransform( mVectorLayer->crs(), mComposition->mapSettings().destinationCrs() );
@@ -2687,11 +2687,8 @@ void QgsWMSServer::applyOpacities( const QStringList& layerList, QList< QPair< Q
//modify symbols of current renderer
QgsRenderContext context;
context.expressionContext() << QgsExpressionContextUtils::globalScope()
<< QgsExpressionContextUtils::projectScope();
if ( vl )
{
context.expressionContext() << QgsExpressionContextUtils::layerScope( vl );
}
<< QgsExpressionContextUtils::projectScope()
<< QgsExpressionContextUtils::layerScope( vl );

QgsSymbolV2List symbolList = rendererV2->symbols( context );
QgsSymbolV2List::iterator symbolIt = symbolList.begin();

0 comments on commit 40f4f20

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