Project

General

Profile

« Previous | Next » 

Revision c4ae573c

Added by Katja Luther over 4 years ago

ref #8385: fix NPE

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java
95 95
        getValues();
96 96
        Composite composite = new Composite(parent, SWT.NULL);
97 97
        composite.setLayout(new GridLayout());
98
        if (!isAdminPreference && distributionEditorPref != null && !distributionEditorPref.isAllowOverride()&& !isEditorActivated ) {
98
        if (!isAdminPreference && distributionEditorPref != null && !distributionEditorPref.isAllowOverride()&& isEditorActivated != null && !isEditorActivated ) {
99 99
            Label label = new Label(composite, SWT.NONE);
100 100
            label.setText(
101 101
                    "The CDM settings don't allow to set the preferences for using the distribution editor locally. If you need to make local settings, please ask an administrator.");
......
153 153
                if (isEditorActivated != null){
154 154
                    child.setEnabled(isEditorActivated);
155 155
                }else{
156
                    child.setEnabled(Boolean.parseBoolean(distributionEditorPref.getValue().toString()));
156
                    child.setEnabled(distributionEditorPref.getValue() != null?Boolean.parseBoolean(distributionEditorPref.getValue().toString()): true);
157 157
                }
158 158
            }
159 159
            separator = new Label(child, SWT.HORIZONTAL | SWT.SEPARATOR);
......
518 518
            String text = activateCombo.getText();
519 519
            if(text.startsWith(Messages.Preference_Use_Default)){
520 520
                isEditorActivated = null;
521

  
521 522
                return;
522 523
            }
523 524

  

Also available in: Unified diff