1
0
Fork 0
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:
John Cortell 2006-10-25 22:09:19 +00:00
parent 25232db42d
commit 6c0b422478

View file

@ -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()] );