diff options
Diffstat (limited to 'lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java')
-rw-r--r-- | lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java b/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java index 9688714732..3df844ed6f 100644 --- a/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java +++ b/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java @@ -879,26 +879,40 @@ public class LTTngControlService implements ILttngControlService { } else if (LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE.matcher(subLine).matches()) { String value = getAttributeValue(subLine); - channelInfo.setOverwriteMode(!LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE_FALSE.equals(value)); + if (channelInfo != null) { + channelInfo.setOverwriteMode(!LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE_FALSE.equals(value)); + } } else if (LTTngControlServiceConstants.SUBBUFFER_SIZE_ATTRIBUTE.matcher(subLine).matches()) { - channelInfo.setSubBufferSize(Long.valueOf(getAttributeValue(subLine))); + if (channelInfo != null) { + channelInfo.setSubBufferSize(Long.valueOf(getAttributeValue(subLine))); + } } else if (LTTngControlServiceConstants.NUM_SUBBUFFERS_ATTRIBUTE.matcher(subLine).matches()) { - channelInfo.setNumberOfSubBuffers(Integer.valueOf(getAttributeValue(subLine))); + if (channelInfo != null) { + channelInfo.setNumberOfSubBuffers(Integer.valueOf(getAttributeValue(subLine))); + } } else if (LTTngControlServiceConstants.SWITCH_TIMER_ATTRIBUTE.matcher(subLine).matches()) { - channelInfo.setSwitchTimer(Long.valueOf(getAttributeValue(subLine))); + if (channelInfo != null) { + channelInfo.setSwitchTimer(Long.valueOf(getAttributeValue(subLine))); + } } else if (LTTngControlServiceConstants.READ_TIMER_ATTRIBUTE.matcher(subLine).matches()) { - channelInfo.setReadTimer(Long.valueOf(getAttributeValue(subLine))); + if (channelInfo != null) { + channelInfo.setReadTimer(Long.valueOf(getAttributeValue(subLine))); + } } else if (LTTngControlServiceConstants.OUTPUT_ATTRIBUTE.matcher(subLine).matches()) { - channelInfo.setOutputType(getAttributeValue(subLine)); + if (channelInfo != null) { + channelInfo.setOutputType(getAttributeValue(subLine)); + } } else if (LTTngControlServiceConstants.EVENT_SECTION_PATTERN.matcher(subLine).matches()) { List<IEventInfo> events = new ArrayList<IEventInfo>(); index = parseEvents(output, index, events); - channelInfo.setEvents(events); + if (channelInfo != null) { + channelInfo.setEvents(events); + } // we want to stay at the current index to be able to // exit the domain continue; |