Minor coverity fixes

This commit is contained in:
Nyall Dawson 2015-09-06 19:13:54 +10:00
parent bb9addd05b
commit b00629882d
4 changed files with 12 additions and 2 deletions

View File

@ -976,6 +976,7 @@ QgisApp::QgisApp()
, mProjectLastModified()
, mWelcomePage( 0 )
, mCentralContainer( 0 )
, mProjOpen( 0 )
{
smInstance = this;
setupUi( this );

View File

@ -64,7 +64,7 @@ void QgsMapToolAddCircularString::setParentTool( QgsMapTool* newTool, QgsMapTool
void QgsMapToolAddCircularString::keyPressEvent( QKeyEvent* e )
{
if ( e->isAutoRepeat() )
if ( e && e->isAutoRepeat() )
{
return;
}

View File

@ -39,6 +39,7 @@
#include "problem.h"
#include "util.h"
#include "priorityqueue.h"
#include "internalexception.h"
#include <iostream>
#include <fstream>
#include <cfloat>
@ -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)

View File

@ -53,6 +53,7 @@ namespace pal
Feats()
: feature( 0 )
, shape( 0 )
, priority( 0 )
{}
FeaturePart *feature;