diff --git a/com/gallery/GalleryRemote/PictureInspector.java b/com/gallery/GalleryRemote/PictureInspector.java index fe9dcb6..2d31715 100644 --- a/com/gallery/GalleryRemote/PictureInspector.java +++ b/com/gallery/GalleryRemote/PictureInspector.java @@ -236,7 +236,7 @@ public void changedUpdate(DocumentEvent e) { } public void textUpdate() { - if (pictures != null) { + if (pictures != null && pictures.length > 0) { ((Picture)pictures[0]).setCaption( caption.getText() ); } }