Skip to content

Commit a483a78

Browse files
committed
Null check for org.eclipse.help.IContext
Check whether context is null or not before invoking getText() Fixes : #1689
1 parent 27a1efe commit a483a78

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ua/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************************************
2-
* Copyright (c) 2000, 2020 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -333,6 +333,9 @@ void displayContext(IContext context, int x, int y, boolean noInfopop) {
333333
* If the context help has no description text and exactly one
334334
* topic, go straight to the topic and skip context help.
335335
*/
336+
if (context == null) {
337+
return;
338+
}
336339
String contextText = context.getText();
337340
IHelpResource[] topics = context.getRelatedTopics();
338341
boolean isSingleChoiceWithoutDescription = contextText == null && topics.length == 1;

0 commit comments

Comments
 (0)