aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/image/Raster.java
diff options
context:
space:
mode:
authorSascha Brawer <brawer@dandelis.ch>2003-09-25 18:35:44 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-09-25 18:35:44 +0000
commit864135da898c0f5cfcec8812a3a2f4f8404bd776 (patch)
treee04f806d40f3612b7ee39b29f06043340429b451 /libjava/java/awt/image/Raster.java
parent2ccba5f0f4ef42e118e11cfa60cac5b8669ee606 (diff)
downloadgcc-864135da898c0f5cfcec8812a3a2f4f8404bd776.zip
gcc-864135da898c0f5cfcec8812a3a2f4f8404bd776.tar.gz
gcc-864135da898c0f5cfcec8812a3a2f4f8404bd776.tar.bz2
Really commit the files.
From-SVN: r71790
Diffstat (limited to 'libjava/java/awt/image/Raster.java')
-rw-r--r--libjava/java/awt/image/Raster.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/libjava/java/awt/image/Raster.java b/libjava/java/awt/image/Raster.java
index 1b3d2f0..ff6033a 100644
--- a/libjava/java/awt/image/Raster.java
+++ b/libjava/java/awt/image/Raster.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation
+/* Copyright (C) 2000, 2002, 2003 Free Software Foundation
This file is part of GNU Classpath.
@@ -81,8 +81,15 @@ public class Raster
this.minY = aRegion.y;
this.width = aRegion.width;
this.height = aRegion.height;
- this.sampleModelTranslateX = sampleModelTranslate.x;
- this.sampleModelTranslateY = sampleModelTranslate.y;
+
+ // If sampleModelTranslate is null, use (0,0). Methods such as
+ // Raster.createRaster are specified to allow for a null argument.
+ if (sampleModelTranslate != null)
+ {
+ this.sampleModelTranslateX = sampleModelTranslate.x;
+ this.sampleModelTranslateY = sampleModelTranslate.y;
+ }
+
this.numBands = sampleModel.getNumBands();
this.numDataElements = sampleModel.getNumDataElements();
this.parent = parent;