From 5256a869aacab87887a198550e514b47286288a9 Mon Sep 17 00:00:00 2001 From: John Cortell Date: Thu, 20 May 2010 22:21:20 +0000 Subject: [PATCH] Bug 313823: Intermittent NPE during shutdown, in ThreadVMNode --- .../dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java index cafdab38d71..cf8f2935e67 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2008 Wind River Systems and others. + * Copyright (c) 2006, 2010 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -85,7 +85,9 @@ public class ThreadVMNode extends AbstractThreadVMNode @Override public boolean isEnabled(IStatus status, java.util.Map properties) { - return !((Boolean)properties.get(ILaunchVMConstants.PROP_IS_SUSPENDED)).booleanValue(); + // prop has been seen to be null during session shutdown [313823] + Boolean prop = (Boolean)properties.get(ILaunchVMConstants.PROP_IS_SUSPENDED); + return (prop != null) ? !prop.booleanValue() : false; }; }, new LabelImage(DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED)),