Commit 6737f702 authored by Dumoulin Nicolas's avatar Dumoulin Nicolas
Browse files

bugfixes: npe and instance error

parent 58648dff
......@@ -85,7 +85,10 @@ public class DefaultObjectIntrospector {
try {
String fieldName = buildNameFromField(innerField);
Class fieldType = innerField.getType();
Object fieldValue = innerField.get(objectComplex.getValue());
Object fieldValue = null;
if (objectComplex.getValue() != null) {
fieldValue = innerField.get(objectComplex.getValue());
}
OhObject child = introspectChild(ohOui, fieldType, fieldName, fieldValue, innerField.getGenericType(), fieldFilters);
child.setField(innerField);
if (innerField.isAnnotationPresent(Description.class)) {
......
......@@ -53,8 +53,7 @@ public class FileProducer implements OhEditorProducer<File, JComponent> {
public FileOUIPanel(OhObject<File> object, String title, String tooltip) {
super(object);
this.fileChooser = new JFileChooser();
textField = new JTextField(this.getValue().toString(), 20);
textField = new JTextField(object.getValue().toString(), 20);
this.addLabel(title, tooltip);
this.addComponent(textField, tooltip);
JButton browseButton = ControlsFactory.makeButton("general/Open16", this, "Browse", "...");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment