git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53988 15284696-431f-4ddb-bdfa-cd5b030d7da7
@@ -293,6 +293,8 @@ class RasterAbstractBase(object):
if not region:
region = Region()
x, y = functions.coor2pixel(point.coords(), region)
+ if x < 0 or x > region.cols or y < 0 or y > region.rows:
+ return None
line = self.get_row(int(x))
return line[int(y)]