Skip to content

Commit

Permalink
Check if the widget is already disposed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Jan 13, 2025
1 parent 2e7de8a commit fd4dfbc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2016, 2024 Lablicate GmbH.
* Copyright (c) 2016, 2025 Lablicate GmbH.
*
* All rights reserved.
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -81,7 +81,9 @@ public void update(ViewerCell cell) {
Image image = getIcon(element);
// https://github.com/eclipse-platform/eclipse.platform.swt/issues/678
Display.getCurrent().asyncExec(() -> {
cell.setImage(image);
if(!cell.getControl().isDisposed()) {
cell.setImage(image);
}
});
cell.setBackground(getBackground(element));
cell.setForeground(getForeground(element));
Expand Down

0 comments on commit fd4dfbc

Please sign in to comment.