mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-21 07:55:24 +02:00
Patch form Thomas Fletcher to fix a NullPointerException.
This commit is contained in:
parent
cede94d323
commit
f076b37dfa
2 changed files with 8 additions and 3 deletions
5
core/org.eclipse.cdt.ui/ChangeLog
Normal file
5
core/org.eclipse.cdt.ui/ChangeLog
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
2002-10-11 Alain Magloire
|
||||||
|
* CEditorTextHoverDispatcher.java (getCurrentTextHover):
|
||||||
|
This fixes a null pointer exception received when we hover
|
||||||
|
over the code in the C/C++ Editor colour preference dialog.
|
||||||
|
From Thomas Fletcher.
|
|
@ -47,9 +47,9 @@ public class CEditorTextHoverDispatcher implements ITextHover
|
||||||
|
|
||||||
private ITextHover getCurrentTextHover()
|
private ITextHover getCurrentTextHover()
|
||||||
{
|
{
|
||||||
IWorkbenchPage page = fEditor.getSite().getPage();
|
IWorkbenchPage page;
|
||||||
if ( page != null )
|
if(fEditor != null && fEditor.getSite() != null &&
|
||||||
{
|
(page = fEditor.getSite().getPage()) != null) {
|
||||||
Object textHover = fTextHovers.get( page.getPerspective().getId() );
|
Object textHover = fTextHovers.get( page.getPerspective().getId() );
|
||||||
if ( textHover != null && textHover instanceof ITextHover )
|
if ( textHover != null && textHover instanceof ITextHover )
|
||||||
return (ITextHover)textHover;
|
return (ITextHover)textHover;
|
||||||
|
|
Loading…
Add table
Reference in a new issue