mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
add safety code
This commit is contained in:
parent
de3d38983e
commit
8822b8d679
1 changed files with 1 additions and 0 deletions
|
@ -51,6 +51,7 @@ public class MedicamentDetailFragment extends Fragment {
|
|||
medicament = (Medicament) getArguments().getSerializable(ARG_ITEM_ID);
|
||||
|
||||
Activity activity = this.getActivity();
|
||||
assert activity != null;
|
||||
CollapsingToolbarLayout appBarLayout = activity.findViewById(R.id.toolbar_layout);
|
||||
if (appBarLayout != null) {
|
||||
appBarLayout.setTitle(medicament.getNom());
|
||||
|
|
Loading…
Reference in a new issue