diff --git a/src/Efi.cs b/src/Efi.cs index 517fb27..5be3b1e 100644 --- a/src/Efi.cs +++ b/src/Efi.cs @@ -170,6 +170,10 @@ public class Efi { */ public static void SetBootToFW() { Variable tmp = GetVariable("OsIndications"); + if (tmp.Data == null) { + tmp.Data = new byte[8]; + tmp.Attributes = 7; + } tmp.Data[0] |= 1; SetVariable(tmp); }