From 12609ee055837cebb912928882fd078b8675d84d Mon Sep 17 00:00:00 2001 From: Curtis D'Entremont Date: Thu, 9 Mar 2006 21:51:23 +0000 Subject: [Bug 131197] include pointing to non-present plugin causes topic to not show --- .../internal/xhtml/UAContentMergeProcessor.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/org.eclipse.help/src/org/eclipse/help/internal/xhtml/UAContentMergeProcessor.java b/org.eclipse.help/src/org/eclipse/help/internal/xhtml/UAContentMergeProcessor.java index 786531559..885847e21 100644 --- a/org.eclipse.help/src/org/eclipse/help/internal/xhtml/UAContentMergeProcessor.java +++ b/org.eclipse.help/src/org/eclipse/help/internal/xhtml/UAContentMergeProcessor.java @@ -96,16 +96,19 @@ public class UAContentMergeProcessor { Bundle bundle = Platform.getBundle(pluginID); ArrayList pathPrefix = ResourceLocator.getPathPrefix(locale); - URL flatFileURL = ResourceLocator.find(bundle, new Path(pluginRelativePath), pathPrefix); - if (flatFileURL != null) - try { - InputStream inputStream = flatFileURL.openStream(); - UAContentParser parser = new UAContentParser(inputStream); - Document dom = parser.getDocument(); - return DOMUtil.getElementById(dom, include_id, "*"); //$NON-NLS-1$ - } catch (IOException e) { - return null; + if (bundle != null) { + URL flatFileURL = ResourceLocator.find(bundle, new Path(pluginRelativePath), pathPrefix); + if (flatFileURL != null) { + try { + InputStream inputStream = flatFileURL.openStream(); + UAContentParser parser = new UAContentParser(inputStream); + Document dom = parser.getDocument(); + return DOMUtil.getElementById(dom, include_id, "*"); //$NON-NLS-1$ + } catch (IOException e) { + return null; + } } + } return null; } -- cgit v1.2.3