Navaron Bracke

do nothing in stop if texture id is null

@@ -276,6 +276,10 @@ class MethodChannelMobileScanner extends MobileScannerPlatform { @@ -276,6 +276,10 @@ class MethodChannelMobileScanner extends MobileScannerPlatform {
276 276
277 @override 277 @override
278 Future<void> stop() async { 278 Future<void> stop() async {
  279 + if (_textureId == null) {
  280 + return;
  281 + }
  282 +
279 await methodChannel.invokeMethod<void>('stop'); 283 await methodChannel.invokeMethod<void>('stop');
280 284
281 _textureId = null; 285 _textureId = null;