Skip to content

Commit b70d1ce

Browse files
committed
Add null check
1 parent 96aa439 commit b70d1ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/video_player_avplay/lib/video_player.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,10 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
375375
final DeviceInfoPluginTizen deviceInfoPlugin = DeviceInfoPluginTizen();
376376
final TizenDeviceInfo deviceInfo = await deviceInfoPlugin.tizenInfo;
377377

378-
if (deviceInfo.platformVersion != apiVersion) {
378+
if ((deviceInfo.platformVersion != null &&
379+
deviceInfo.platformVersion!.isNotEmpty) &&
380+
apiVersion != 'none' &&
381+
(deviceInfo.platformVersion != apiVersion)) {
379382
throw Exception(
380383
'The current TizenOS version(${deviceInfo.platformVersion}) '
381384
'and the app API version($apiVersion) are different. '

0 commit comments

Comments
 (0)