Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2007-09-28 18:46:22 +0000
committerChris Goldthorpe2007-09-28 18:46:22 +0000
commitcd733e3eb5bca4f3a5b3953db9946409949018c0 (patch)
tree4091841f5f4f72423ed349d93df0ece56f1039a6 /org.eclipse.ui.cheatsheets/src/org
parenta4375069c2db58dc5def46bcb811e6cdd27829bf (diff)
downloadeclipse.platform.ua-cd733e3eb5bca4f3a5b3953db9946409949018c0.tar.gz
eclipse.platform.ua-cd733e3eb5bca4f3a5b3953db9946409949018c0.tar.xz
eclipse.platform.ua-cd733e3eb5bca4f3a5b3953db9946409949018c0.zip
Bug 190506 – [CheatSheet] NPE possible when entering invalid URL in opn from URL
Diffstat (limited to 'org.eclipse.ui.cheatsheets/src/org')
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
index 1f648febe..77039986b 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
@@ -614,6 +614,9 @@ public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends
// Use the filename without extension as the id of this cheatsheet
IPath filePath = new Path(selectUrlCombo.getText());
String id = filePath.lastSegment();
+ if (id == null) {
+ id = ""; //$NON-NLS-1$
+ }
int extensionIndex = id.indexOf('.');
if (extensionIndex > 0) {
id = id.substring(0, extensionIndex);

Back to the top