diff options
author | Camille Letavernier | 2013-11-18 13:10:50 +0000 |
---|---|---|
committer | Camille Letavernier | 2013-11-18 13:14:23 +0000 |
commit | 9e7b6bd1624988252fcc1b5c0c74892c7c5c909f (patch) | |
tree | 527dccc32c36a24fa3f785e67f6f654c925b8cf2 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing | |
parent | b6729081e468670cee84c48ce703467886af64f6 (diff) | |
download | org.eclipse.papyrus-9e7b6bd1624988252fcc1b5c0c74892c7c5c909f.tar.gz org.eclipse.papyrus-9e7b6bd1624988252fcc1b5c0c74892c7c5c909f.tar.xz org.eclipse.papyrus-9e7b6bd1624988252fcc1b5c0c74892c7c5c909f.zip |
[Trivial] Add a non-null protection to one of the Timing Diagram's
commands (The bug is not reproducible directly in Papyrus)
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CreateTickCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CreateTickCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CreateTickCommand.java index b8c89a5f5e5..99d127a9903 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CreateTickCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CreateTickCommand.java @@ -45,7 +45,7 @@ public class CreateTickCommand extends GraphicalCommandHandler { protected Command getCommand() {
final CompoundCommand cmd = new CompoundCommand(Messages.CreateTickCommand_attachTick);
final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
- if(!selection.isEmpty() && selection instanceof IStructuredSelection) {
+ if(selection instanceof IStructuredSelection && !selection.isEmpty()) {
final IStructuredSelection structSelection = (IStructuredSelection)selection;
for(final Object object : structSelection.toArray()) {
if(object instanceof OccurrenceSpecificationEditPartCN || object instanceof MessageOccurrenceSpecificationEditPartCN || object instanceof DestructionOccurrenceSpecificationEditPartCN) {
|