Skip to content
Permalink
Browse files

fix divide by zero number error

  • Loading branch information
Samweli authored and nyalldawson committed Apr 29, 2020
1 parent dc023e6 commit bc3cea92e506888eefaa4279ddc7c9590a914dfa
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/providers/wms/qgswmscapabilities.cpp
@@ -335,6 +335,9 @@ QDateTime QgsWmsSettings::findLeastClosestDateTime( QDateTime dateTime, bool dat
break;

long long resolutionSeconds = pair.resolution.interval();

if ( resolutionSeconds <= 0 )
continue;
long long step = std::floor( ( seconds - startSeconds ) / resolutionSeconds );
long long resultSeconds = startSeconds + ( step * resolutionSeconds );

0 comments on commit bc3cea9

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