From 2645d4879d6e7ba740b0ab62631ae0b17e38a33e Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Thu, 24 May 2007 09:04:00 +0000 Subject: [PATCH] Fix for 183578: NPE creating an address breakpoint in the Disassembly view --- .../eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java index 9f26b43d778..5513d8a0ce4 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 QNX Software Systems and others. + * Copyright (c) 2000, 2007 QNX Software 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 @@ -7,6 +7,7 @@ * * Contributors: * QNX Software Systems - Initial API and implementation + * Anton Leherbauer (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.debug.mi.core.cdi; @@ -940,7 +941,9 @@ public class BreakpointManager extends Manager { if (bkpt.getLocator() != null) { ICDILocator locator = bkpt.getLocator(); String file = locator.getFile(); - file = new File(file).getName(); + if (file != null) { + file = new File(file).getName(); + } String function = locator.getFunction(); int no = locator.getLineNumber(); if (bkpt instanceof LineBreakpoint) {