Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ public static void main(String[] args) {
button.setText ("Snapshot");
button.addListener (SWT.Selection, e -> {
Image image = label.getImage ();
if (image != null) image.dispose ();
if (image != null) {
image.dispose ();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the order be changed - first, set label image to null and afterwards dispose the image?

label.setImage(null);
}
Rectangle rect = group.getBounds();
image = new Image (display, rect.width, rect.height);
GC gc = new GC (image);
Expand Down
Loading