mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 09:45:39 +02:00
Fix for 162327: NPE when you hit Remove All Global Variables on an empty variables view.
This commit is contained in:
parent
25232db42d
commit
6c0b422478
1 changed files with 4 additions and 0 deletions
|
@ -136,6 +136,10 @@ public class CGlobalVariableManager implements ICGlobalVariableManager {
|
|||
* @see org.eclipse.cdt.debug.core.ICGlobalVariableManager#removeAllGlobals()
|
||||
*/
|
||||
public void removeAllGlobals() {
|
||||
if (fGlobals == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
ICGlobalVariable[] globals = new ICGlobalVariable[0];
|
||||
synchronized( fGlobals ) {
|
||||
globals = (ICGlobalVariable[])fGlobals.toArray( new ICGlobalVariable[fGlobals.size()] );
|
||||
|
|
Loading…
Add table
Reference in a new issue