Fix a crash in pring spooler.
If the printer capabilities are reported with a delay which is pretty common we were trying to evaluate the preview page dimensions without having a media size resulting in a NPE. bug:17501953 Change-Id: I6765137f61b8fd060e9eabff07e632875d934963
This commit is contained in:
@@ -384,6 +384,10 @@ public final class PageAdapter extends Adapter implements
|
||||
}
|
||||
|
||||
private void updatePreviewAreaPageSizeAndEmptyState() {
|
||||
if (mMediaSize == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final int availableWidth = mPreviewArea.getWidth();
|
||||
final int availableHeight = mPreviewArea.getHeight();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user