1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 337284 - NPE in debug expression hover

This commit is contained in:
Anton Leherbauer 2011-02-16 11:39:45 +00:00
parent b9d2bc1e13
commit 2aa98ad07f

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2009, 2010 Nokia Corporation and others. * Copyright (c) 2009, 2011 Nokia Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -134,13 +134,15 @@ abstract public class AbstractDsfDebugTextHover extends AbstractDebugTextHover i
try { try {
GetExpressionValueQuery query = new GetExpressionValueQuery(frame, expression, dsfServicesTracker); GetExpressionValueQuery query = new GetExpressionValueQuery(frame, expression, dsfServicesTracker);
DsfSession session = DsfSession.getSession(sessionId); DsfSession session = DsfSession.getSession(sessionId);
session.getExecutor().execute(query); if (session != null) {
try { session.getExecutor().execute(query);
FormattedValueDMData data = query.get(); try {
if (data != null) FormattedValueDMData data = query.get();
return data.getFormattedValue(); if (data != null)
} catch (Exception e) { return data.getFormattedValue();
} } catch (Exception e) {
}
}
} finally { } finally {
dsfServicesTracker.dispose(); dsfServicesTracker.dispose();
} }