Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minor coverity fixes
  • Loading branch information
nyalldawson committed Sep 6, 2015
1 parent bb9addd commit b006298
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -976,6 +976,7 @@ QgisApp::QgisApp()
, mProjectLastModified()
, mWelcomePage( 0 )
, mCentralContainer( 0 )
, mProjOpen( 0 )
{
smInstance = this;
setupUi( this );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdcircularstring.cpp
Expand Up @@ -64,7 +64,7 @@ void QgsMapToolAddCircularString::setParentTool( QgsMapTool* newTool, QgsMapTool

void QgsMapToolAddCircularString::keyPressEvent( QKeyEvent* e )
{
if ( e->isAutoRepeat() )
if ( e && e->isAutoRepeat() )
{
return;
}
Expand Down
10 changes: 9 additions & 1 deletion src/core/pal/problem.cpp
Expand Up @@ -39,6 +39,7 @@
#include "problem.h"
#include "util.h"
#include "priorityqueue.h"
#include "internalexception.h"
#include <iostream>
#include <fstream>
#include <cfloat>
Expand Down Expand Up @@ -328,7 +329,14 @@ namespace pal
for ( j = 0; j < featNbLp[i]; j++ )
{
label = featStartId[i] + j;
list->insert( label, ( double ) mLabelPositions.at( label )->getNumOverlaps() );
try
{
list->insert( label, ( double ) mLabelPositions.at( label )->getNumOverlaps() );
}
catch ( pal::InternalException::Full )
{
continue;
}
}

while ( list->getSize() > 0 ) // O (log size)
Expand Down
1 change: 1 addition & 0 deletions src/core/pal/util.h
Expand Up @@ -53,6 +53,7 @@ namespace pal
Feats()
: feature( 0 )
, shape( 0 )
, priority( 0 )
{}

FeaturePart *feature;
Expand Down

0 comments on commit b006298

Please sign in to comment.