summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shim.c b/shim.c
index 530b545d..569a6084 100644
--- a/shim.c
+++ b/shim.c
@@ -1441,8 +1441,10 @@ static EFI_STATUS handle_image (void *data, unsigned int datasize,
li->ImageSize = context.ImageSize;
/* Pass the load options to the second stage loader */
- li->LoadOptions = load_options;
- li->LoadOptionsSize = load_options_size;
+ if ( load_options ) {
+ li->LoadOptions = load_options;
+ li->LoadOptionsSize = load_options_size;
+ }
if (!found_entry_point) {
perror(L"Entry point is not within sections\n");