Fix null pointer on opening dictionary download activity
app/src/main/java/eu/lepiller/nani/DictionaryDownloadActivity.java
121 | 121 | } | |
122 | 122 | ||
123 | 123 | int drawableResId = d.isDownloaded() ? R.drawable.ic_nani_refresh : R.drawable.ic_nani_download; | |
124 | + | download_button = findViewById(R.id.download_button); | |
124 | 125 | if(d.isDownloaded()) | |
125 | 126 | download_button.setContentDescription(getString(R.string.alt_text_refresh)); | |
126 | 127 | else | |
127 | 128 | download_button.setContentDescription(getString(R.string.alt_text_download)); | |
128 | - | download_button = findViewById(R.id.download_button); | |
129 | 129 | setIcon(download_button, drawableResId); | |
130 | 130 | download_button.setEnabled(true); | |
131 | 131 |