diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java index c7e3f126..959a0939 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java @@ -633,8 +633,11 @@ public class TopicActivity extends BaseActivity implements TopicAdapter.OnPostFo else { Timber.i("Post edit unsuccessful"); Toast.makeText(BaseApplication.getInstance().getApplicationContext(), "Edit failed!", Toast.LENGTH_SHORT).show(); - recyclerView.getChildAt(viewModel.getPostBeingEditedPosition()).setAlpha(1); - recyclerView.getChildAt(viewModel.getPostBeingEditedPosition()).setEnabled(true); + View postBeingEditedView = recyclerView.getChildAt(viewModel.getPostBeingEditedPosition()); + if (postBeingEditedView != null) { + postBeingEditedView.setAlpha(1); + postBeingEditedView.setEnabled(true); + } } } });