video fragment: handle possible null pointer on configuration change

This commit is contained in:
Andrew Dolgov 2017-06-04 11:56:58 +03:00
parent e80a85d3b4
commit ddfd967ac7

View File

@ -297,7 +297,11 @@ public class GalleryVideoFragment extends GalleryBaseFragment {
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
resizeSurface(getView().findViewById(R.id.flavor_video));
try {
resizeSurface(getView().findViewById(R.id.flavor_video));
} catch (Exception e) {
e.printStackTrace();
}
}
}