Skip to content

Commit

Permalink
fix: crash when adding a new trail marker
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza417 committed Mar 4, 2025
1 parent 1439869 commit 8115220
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/src/main/java/app/simple/positional/model/TrailPoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.util.Objects;

@Entity(tableName = "trail_data")
public class TrailPoint {

Expand Down Expand Up @@ -103,15 +105,15 @@ public void setIconPosition(int iconPosition) {
}

public String getNote() {
return note;
return Objects.requireNonNullElse(note, "");
}

public void setNote(String note) {
this.note = note;
}

public String getName() {
return name;
return Objects.requireNonNullElse(name, "");
}

public void setName(String name) {
Expand Down

0 comments on commit 8115220

Please sign in to comment.