Skip to content

Commit 09a4b0f

Browse files
committed
npe checks
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent a69f835 commit 09a4b0f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,11 @@ protected void saveNote(@Nullable ISyncCallback callback) {
390390
* Opens a dialog in order to chose a category
391391
*/
392392
private void showCategorySelector() {
393+
if (note == null) {
394+
Log.e(TAG, "note is null, showCategorySelector");
395+
return;
396+
}
397+
393398
final var fragmentId = "fragment_category";
394399
final var manager = requireActivity().getSupportFragmentManager();
395400
final var frag = manager.findFragmentByTag(fragmentId);
@@ -405,6 +410,11 @@ private void showCategorySelector() {
405410
* Opens a dialog in order to chose a category
406411
*/
407412
public void showEditTitleDialog() {
413+
if (note == null) {
414+
Log.e(TAG, "note is null, showEditTitleDialog");
415+
return;
416+
}
417+
408418
saveNote(null);
409419
final var fragmentId = "fragment_edit_title";
410420
final var manager = requireActivity().getSupportFragmentManager();

0 commit comments

Comments
 (0)