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,9 +87,11 @@ public class VMCommandUtils {
|
|||
if (input instanceof IAdaptable && viewer instanceof TreeModelViewer) {
|
||||
IPresentationContext presContext = ((TreeModelViewer)viewer).getPresentationContext();
|
||||
IVMAdapter vmAdapter = (IVMAdapter)((IAdaptable)input).getAdapter(IVMAdapter.class);
|
||||
if (vmAdapter != null) {
|
||||
return vmAdapter.getVMProvider(presContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue