Skip to content

Commit

Permalink
Update contents only if the result is non-null
Browse files Browse the repository at this point in the history
  • Loading branch information
artdeell authored Jul 12, 2023
1 parent 499bbb9 commit 2c3f705
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ private static void querySystemClipboard() {
private static void systemClipboardDataReceived(String clipboardData, String clipboardDataMime) {
synchronized(sSyncLock) {
lastClipboardCheckTime = System.currentTimeMillis();
INSTANCE.contents = new CTCStringTransferable(clipboardData, clipboardDataMime);
if(clipboardData != null && clipboardDataMime != null)
INSTANCE.contents = new CTCStringTransferable(clipboardData, clipboardDataMime);
sSyncLock.notifyAll();
}
}
Expand Down

0 comments on commit 2c3f705

Please sign in to comment.