File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -184,16 +184,25 @@ EFI_FILE_PROTOCOL * GetDebugLogFile (VOID) {
184
184
//
185
185
// Get mRootDir from the device we are loaded from
186
186
mRootDir = EfiLibOpenRoot (LoadedImage -> DeviceHandle );
187
-
188
187
LogProtocol = OpenLogFile ();
189
- Status = REFIT_CALL_1_WRAPPER (mRootDir -> Close , mRootDir );
188
+ if (mRootDir == NULL ) {
189
+ Status = EFI_NOT_READY ;
190
+ }
191
+ else {
192
+ Status = REFIT_CALL_1_WRAPPER (mRootDir -> Close , mRootDir );
193
+ }
190
194
if (EFI_ERROR (Status )) {
191
195
// Try on first EFI partition
192
196
mRootDir = NULL ;
193
197
Status = egFindESP (& mRootDir );
194
198
if (!EFI_ERROR (Status )) {
195
199
LogProtocol = OpenLogFile ();
196
- Status = REFIT_CALL_1_WRAPPER (mRootDir -> Close , mRootDir );
200
+ if (mRootDir == NULL ) {
201
+ Status = EFI_NOT_READY ;
202
+ }
203
+ else {
204
+ Status = REFIT_CALL_1_WRAPPER (mRootDir -> Close , mRootDir );
205
+ }
197
206
}
198
207
199
208
if (EFI_ERROR (Status )) {
You can’t perform that action at this time.
0 commit comments