diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/WebEventUtils.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/WebEventUtils.java index d81846db27..68317d126a 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/WebEventUtils.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/utils/WebEventUtils.java @@ -20,6 +20,7 @@ import org.jkiss.dbeaver.model.app.DBPProject; import org.jkiss.dbeaver.model.websocket.WSConstants; import org.jkiss.dbeaver.model.websocket.event.WSEvent; +import org.jkiss.dbeaver.model.websocket.event.WSEventController; import org.jkiss.dbeaver.model.websocket.event.datasource.WSDataSourceEvent; import org.jkiss.dbeaver.model.websocket.event.datasource.WSDataSourceProperty; import org.jkiss.dbeaver.model.websocket.event.datasource.WSDatasourceFolderEvent; @@ -47,6 +48,10 @@ public static void addDataSourceUpdatedEvent( if (project == null) { return; } + WSEventController eventController = WebAppUtils.getWebApplication().getEventController(); + if (eventController == null) { + return; + } WSEvent event = null; switch (eventAction) { case CREATE: @@ -80,7 +85,7 @@ public static void addDataSourceUpdatedEvent( if (event == null) { return; } - WebAppUtils.getWebApplication().getEventController().addEvent(event); + eventController.addEvent(event); } public static void addNavigatorNodeUpdatedEvent(