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

[250228] - [menu] NPE in VMCommandUtils

This commit is contained in:
Pawel Piech 2008-10-09 05:21:06 +00:00
parent f9a7d7cf7d
commit 2821634b7d

View file

@ -87,7 +87,9 @@ public class VMCommandUtils {
if (input instanceof IAdaptable && viewer instanceof TreeModelViewer) { if (input instanceof IAdaptable && viewer instanceof TreeModelViewer) {
IPresentationContext presContext = ((TreeModelViewer)viewer).getPresentationContext(); IPresentationContext presContext = ((TreeModelViewer)viewer).getPresentationContext();
IVMAdapter vmAdapter = (IVMAdapter)((IAdaptable)input).getAdapter(IVMAdapter.class); IVMAdapter vmAdapter = (IVMAdapter)((IAdaptable)input).getAdapter(IVMAdapter.class);
return vmAdapter.getVMProvider(presContext); if (vmAdapter != null) {
return vmAdapter.getVMProvider(presContext);
}
} }
} }
return null; return null;