]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
Bump the target API to 28.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / MainWebViewActivity.java
index cc232311a0a8266977cee1da2fd25934bda19e58..36b855a425028c3d0365ea3bffd3e4afd45c0bb3 100644 (file)
@@ -1545,15 +1545,18 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     cookieManager.flush();
                 }
 
-                // Reset the Refresh title.
-                refreshMenuItem.setTitle(R.string.refresh);
-
-                // If the icon is displayed in the AppBar, reset it according to the theme.
-                if (displayAdditionalAppBarIcons) {
-                    if (darkTheme) {
-                        refreshMenuItem.setIcon(R.drawable.refresh_enabled_dark);
-                    } else {
-                        refreshMenuItem.setIcon(R.drawable.refresh_enabled_light);
+                // Update the Refresh menu item if it has been created.
+                if (refreshMenuItem != null) {
+                    // Reset the Refresh title.
+                    refreshMenuItem.setTitle(R.string.refresh);
+
+                    // If the icon is displayed in the AppBar, reset it according to the theme.
+                    if (displayAdditionalAppBarIcons) {
+                        if (darkTheme) {
+                            refreshMenuItem.setIcon(R.drawable.refresh_enabled_dark);
+                        } else {
+                            refreshMenuItem.setIcon(R.drawable.refresh_enabled_light);
+                        }
                     }
                 }