1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

fixed NPE when message field is disabled

This commit is contained in:
David Inglis 2004-03-31 02:40:20 +00:00
parent c2ca5725c1
commit 5cfae571a1

View file

@ -95,7 +95,7 @@ public abstract class TabFolderOptionBlock {
setCurrentPage((ICOptionPage) pages.get(0)); setCurrentPage((ICOptionPage) pages.get(0));
initializingTabs = false; initializingTabs = false;
String desc = ((ICOptionPage) pages.get(0)).getDescription(); String desc = ((ICOptionPage) pages.get(0)).getDescription();
if (desc != null) { if (messageLabel != null && desc != null) {
messageLabel.setText(desc); messageLabel.setText(desc);
} }
return composite; return composite;
@ -186,7 +186,7 @@ public abstract class TabFolderOptionBlock {
if (ok) { if (ok) {
setErrorMessage(null); setErrorMessage(null);
ICOptionPage tab = getCurrentPage(); ICOptionPage tab = getCurrentPage();
if (bShowMessageArea) { if (messageLabel != null) {
messageLabel.setText(tab.getDescription() != null ? tab.getDescription() : ""); //$NON-NLS-1$ messageLabel.setText(tab.getDescription() != null ? tab.getDescription() : ""); //$NON-NLS-1$
} }
} }