sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 01/03: Fix a NullPointerException.
Date Sat, 01 Feb 2020 14:07:49 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 09cd4dd6bd0ee8b6fe81a7217ded1cdef2105dc9
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Sat Feb 1 12:50:19 2020 +0100

    Fix a NullPointerException.
---
 .../src/main/java/org/apache/sis/gui/coverage/ImageRequest.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/ImageRequest.java
b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/ImageRequest.java
index b766222..9d37913 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/ImageRequest.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/ImageRequest.java
@@ -275,9 +275,11 @@ public class ImageRequest {
      */
     final void notifyListeners(final GridCoverage result) {
         final CoverageExplorer[] snapshot = listeners;
-        listeners = null;                                   // Clear now in case an error
happen.
-        for (final CoverageExplorer e : snapshot) {
-            e.onLoadStep(result);
+        if (snapshot != null) {
+            listeners = null;                               // Clear now in case an error
happen.
+            for (final CoverageExplorer e : snapshot) {
+                e.onLoadStep(result);
+            }
         }
     }
 


Mime
View raw message