Fix a rare NPE

This commit is contained in:
Ming Ming 2021-09-15 05:03:09 +08:00
parent 3151e088bc
commit e41df68898

View file

@ -108,7 +108,7 @@ class _ViewerState extends State<Viewer>
children: [
Container(color: Colors.black),
if (!_isViewerLoaded ||
!_pageStates[_viewerController.currentPage]!.hasLoaded)
_pageStates[_viewerController.currentPage]?.hasLoaded != true)
Align(
alignment: Alignment.center,
child: const CircularProgressIndicator(),