Skip to content
Permalink
Browse files

mapserver: don't crash when WIDTH or HEIGHT are missing.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15102 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Jan 28, 2011
1 parent 703d049 commit 030f8ab8b7d9a6581d41ecac028a7d51657b1a23
Showing with 13 additions and 7 deletions.
  1. +1 −1 src/mapserver/qgis_map_serv.cpp
  2. +12 −6 src/mapserver/qgswmsserver.cpp
@@ -49,7 +49,7 @@ void printRequestInfos()
#ifdef QGSMSDEBUG
//print out some infos about the request
QgsMSDebugMsg( "************************new request**********************" )
QgsMSDebugMsg( QDateTime::currentDateTime().toString( "yyyy-mm-dd hh:mm:ss" ) );
QgsMSDebugMsg( QDateTime::currentDateTime().toString( "yyyy-MM-dd hh:mm:ss" ) );

if ( getenv( "REMOTE_ADDR" ) != NULL )
{
@@ -715,10 +715,13 @@ QImage* QgsWMSServer::createImage( int width, int height ) const
{
width = 0; //width parameter is mandatory
}
width = wit->second.toInt( &conversionSuccess );
if ( !conversionSuccess )
else
{
width = 0;
width = wit->second.toInt( &conversionSuccess );
if ( !conversionSuccess )
{
width = 0;
}
}
}

@@ -729,10 +732,13 @@ QImage* QgsWMSServer::createImage( int width, int height ) const
{
height = 0; //height parameter is mandatory
}
height = hit->second.toInt( &conversionSuccess );
if ( !conversionSuccess )
else
{
height = 0;
height = hit->second.toInt( &conversionSuccess );
if ( !conversionSuccess )
{
height = 0;
}
}
}

0 comments on commit 030f8ab

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