Bug 776369 - Fix NullPointerException. r=bnicholson

This commit is contained in:
Michael Comella 2012-07-23 20:02:21 -04:00
Родитель c4c18a9031
Коммит f6aa463f03
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -136,10 +136,13 @@ class FontSizePreference extends DialogPreference {
if (mCurrentOrientation != newConfig.orientation) { if (mCurrentOrientation != newConfig.orientation) {
mCurrentOrientation = newConfig.orientation; mCurrentOrientation = newConfig.orientation;
// Recalculate the mPreviewFontView dimensions since we have new screen dimensions. // mPreviewFontView will be null if the dialog has not yet been shown.
setPreviewFontViewWidth(); if (mPreviewFontView != null) {
mPreviewFontViewHeightSet = false; // Recalculate the mPreviewFontView dimensions since we have new screen dimensions.
setFontSizeToMaximum(); // Expects onGlobalLayout() to be called. setPreviewFontViewWidth();
mPreviewFontViewHeightSet = false;
setFontSizeToMaximum(); // Expects onGlobalLayout() to be called.
}
} }
} }