File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/org/digma/intellij/plugin/toolwindow/recentactivity Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -204,14 +204,19 @@ private void processRecentActivityGoToTraceRequest(RecentActivityGoToTraceReques
204204
205205 private void processRecentActivityGetDataRequest (AnalyticsService analyticsService , JBCefBrowser jbCefBrowser ) {
206206 List <String > allEnvironments = analyticsService .getEnvironments ();
207- List <String > sortedEnvironments = getSortedEnvironments (allEnvironments , localHostname );
207+ if (allEnvironments == null ) {
208+ Log .log (LOGGER ::warn , "error while getting environments from server" );
209+ return ;
210+ }
208211 RecentActivityResult recentActivityData = null ;
209212 try {
210213 recentActivityData = analyticsService .getRecentActivity (allEnvironments );
211214 } catch (AnalyticsServiceException e ) {
212215 Log .log (LOGGER ::warn , "AnalyticsServiceException for getRecentActivity: {}" , e .getMessage ());
213216 }
217+
214218 if (recentActivityData != null ) {
219+ List <String > sortedEnvironments = getSortedEnvironments (allEnvironments , localHostname );
215220 String requestMessage = JBCefBrowserUtil .resultToString (new JcefMessageRequest (
216221 REQUEST_MESSAGE_TYPE ,
217222 RECENT_ACTIVITY_SET_DATA ,
You can’t perform that action at this time.
0 commit comments