Skip to content

Commit

Permalink
Fixes #130 - copy on empty table throws NullPointerException
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com>
  • Loading branch information
fipro78 committed Dec 9, 2024
1 parent 59305bb commit 1a89836
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012, 2020 Original authors and others.
* Copyright (c) 2012, 2024 Original authors and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -157,10 +157,12 @@ public boolean doCommand(CopyDataToClipboardCommand command) {
* @since 1.6
*/
protected void internalDoCommand(CopyDataToClipboardCommand command, ILayerCell[][] assembledCopiedDataStructure) {
ISerializer serializer = this.copyFormattedText
? new CopyFormattedTextToClipboardSerializer(assembledCopiedDataStructure, command)
: new CopyDataToClipboardSerializer(assembledCopiedDataStructure, command);
serializer.serialize();
if (assembledCopiedDataStructure != null) {
ISerializer serializer = this.copyFormattedText
? new CopyFormattedTextToClipboardSerializer(assembledCopiedDataStructure, command)
: new CopyDataToClipboardSerializer(assembledCopiedDataStructure, command);
serializer.serialize();
}
}

@Override
Expand Down

0 comments on commit 1a89836

Please sign in to comment.