mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-21 16:05:25 +02:00
[248627] Potential NPE in StackFramesVMNode
This commit is contained in:
parent
ba51737dc1
commit
edf08beb2d
1 changed files with 6 additions and 6 deletions
|
@ -55,7 +55,6 @@ import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelColumnInfo;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelImage;
|
import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelImage;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelText;
|
import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelText;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.properties.PropertiesBasedLabelProvider;
|
import org.eclipse.cdt.dsf.ui.viewmodel.properties.PropertiesBasedLabelProvider;
|
||||||
import org.eclipse.core.runtime.IPath;
|
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
|
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
|
||||||
|
@ -435,11 +434,12 @@ public class StackFramesVMNode extends AbstractDMVMNode
|
||||||
update.setProperty(ILaunchVMConstants.PROP_FRAME_ADDRESS, "0x" + address.toString(16)); //$NON-NLS-1$
|
update.setProperty(ILaunchVMConstants.PROP_FRAME_ADDRESS, "0x" + address.toString(16)); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
IPath filePath = new Path(data.getFile());
|
String fileName = data.getFile();
|
||||||
String fileName = filePath.toOSString();
|
if (fileName != null) {
|
||||||
Object showFullPathPreference = getVMProvider().getPresentationContext().getProperty(IDsfDebugUIConstants.DEBUG_VIEW_SHOW_FULL_PATH_PROPERTY);
|
Object showFullPathPreference = getVMProvider().getPresentationContext().getProperty(IDsfDebugUIConstants.DEBUG_VIEW_SHOW_FULL_PATH_PROPERTY);
|
||||||
if (showFullPathPreference instanceof Boolean && (Boolean)showFullPathPreference == false) {
|
if (showFullPathPreference instanceof Boolean && (Boolean)showFullPathPreference == false) {
|
||||||
fileName = filePath.lastSegment();
|
fileName = new Path(fileName).lastSegment();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
update.setProperty(ILaunchVMConstants.PROP_FRAME_FILE, fileName);
|
update.setProperty(ILaunchVMConstants.PROP_FRAME_FILE, fileName);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue