Skip to content

Commit 6de76d8

Browse files
committed
Fix NPE
1 parent cf650ce commit 6de76d8

File tree

1 file changed

+5
-3
lines changed
  • eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model

1 file changed

+5
-3
lines changed

eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/LocalBootDashModel.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ public void bundleChanged(BundleEvent event) {
154154
if (event.getBundle() == bundle && event.getType() == BundleEvent.STARTED) {
155155
try {
156156
updateElementsFromWorkspace();
157-
applications.getValue().stream().forEach(e -> e.refreshHasMainMethod());
157+
if (applications != null && applications.getValue() != null) {
158+
applications.getValue().stream().forEach(e -> e.refreshHasMainMethod());
159+
}
158160
} catch (Throwable t) {
159161
Log.log(t);
160162
} finally {
@@ -297,10 +299,10 @@ protected IStatus run(IProgressMonitor monitor) {
297299
doUpdateElementsFromWorkspace();
298300
return Status.OK_STATUS;
299301
}
300-
302+
301303
}.schedule();
302304
}
303-
305+
304306
private void doUpdateElementsFromWorkspace() {
305307
LiveSetVariable<BootProjectDashElement> apps = this.applications;
306308
if (apps!=null) {

0 commit comments

Comments
 (0)