[EVENTLOG]
[reactos.git] / reactos / base / services / eventlog / rpc.c
index 99f8d72..403e827 100644 (file)
@@ -118,6 +118,14 @@ ElfCreateEventLogHandle(PLOGHANDLE *LogHandle,
         if (lpLogHandle->LogFile == NULL)
         {
             lpLogHandle->LogFile = LogfListItemByName(L"Application");
+
+            if (lpLogHandle->LogFile == NULL)
+            {
+                DPRINT1("Application log is missing!\n");
+                Status = STATUS_UNSUCCESSFUL;
+                goto Done;
+            }
+
             lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile);
         }
     }