asaarnak
Committed by David PHAM-VAN

fix #1307 setState() called after dispose()

@@ -306,6 +306,9 @@ class PdfPreviewState extends State<PdfPreview> { @@ -306,6 +306,9 @@ class PdfPreviewState extends State<PdfPreview> {
306 if (!infoLoaded) { 306 if (!infoLoaded) {
307 infoLoaded = true; 307 infoLoaded = true;
308 Printing.info().then((PrintingInfo printingInfo) { 308 Printing.info().then((PrintingInfo printingInfo) {
  309 + if (!mounted) {
  310 + return;
  311 + }
309 setState(() { 312 setState(() {
310 info = printingInfo; 313 info = printingInfo;
311 }); 314 });