Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2011-10-18 01:49:24 +0000
committerMarc-Andre Laperle2011-10-18 01:49:24 +0000
commit432fafe8b9a2e4ee3e74e956b758145da4e4fee9 (patch)
tree28caaa80e6e489b6f98ac28a40c17df92d9f9e03
parentef7a5f4f0bf603392adb1d54f2f14945ef28bcd6 (diff)
downloadorg.eclipse.cdt-432fafe8b9a2e4ee3e74e956b758145da4e4fee9.tar.gz
org.eclipse.cdt-432fafe8b9a2e4ee3e74e956b758145da4e4fee9.tar.xz
org.eclipse.cdt-432fafe8b9a2e4ee3e74e956b758145da4e4fee9.zip
Bug 333839 - NPE opening Rename refactoring dialog
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessor.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessor.java
index 1b7393e3165..2bb5bb1b09a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 Wind River Systems, Inc. and others.
+ * Copyright (c) 2004, 2011 Wind River Systems, Inc. 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
@@ -42,6 +42,8 @@ import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.ui.refactoring.RefactoringSaveHelper;
+
/**
* This is the processor used for the rename. It decides which of the delegates to
* use and forwards further calls to the delegate.
@@ -332,6 +334,9 @@ public class CRenameProcessor extends RenameProcessor {
* @return a save mode from {@link org.eclipse.cdt.internal.ui.refactoring.RefactoringSaveHelper}
*/
public int getSaveMode() {
+ if (fDelegate == null) {
+ return RefactoringSaveHelper.SAVE_NOTHING;
+ }
return fDelegate.getSaveMode();
}

Back to the top