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:
parent
f9a7d7cf7d
commit
2821634b7d
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue