Skip to content

Commit

Permalink
prevent NPE if decoration or paragraphDecoration are null (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperedadnr authored Aug 1, 2023
1 parent cd13f68 commit 71b2f64
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Gluon
* Copyright (c) 2022, 2023, Gluon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -91,8 +91,8 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;
DecorationModel that = (DecorationModel) o;
return start == that.start && length == that.length &&
decoration.equals(that.decoration) &&
paragraphDecoration.equals(that.paragraphDecoration);
Objects.equals(decoration, that.decoration) &&
Objects.equals(paragraphDecoration, that.paragraphDecoration);
}

@Override
Expand Down

0 comments on commit 71b2f64

Please sign in to comment.