]> git.proxmox.com Git - flutter/pve_flutter_frontend.git/commitdiff
fix options view when ostype is null
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 8 Sep 2022 09:55:50 +0000 (11:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 8 Sep 2022 14:06:26 +0000 (16:06 +0200)
can happen when no ostype is set in the config (defaults to 'other')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
lib/widgets/pve_qemu_options_widget.dart

index 788923dc6822eb8007ccc99e81c761ca11c3f502..cd32cff589d521cef44a9b3982f8375cdfe0c7f7 100644 (file)
@@ -53,7 +53,10 @@ class PveQemuOptions extends StatelessWidget {
                         ListTile(
                           title: Text("OS Type"),
                           subtitle: Text(
-                              "${config.ostype!.type} ${config.ostype!.description}"),
+                            config.ostype != null ?
+                              "${config.ostype!.type} ${config.ostype!.description}" :
+                              "Other"
+                          ),
                         ),
                         //TODO add better ui component e.g. collapseable
                         ListTile(