diff --git a/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp b/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
index f1275e7..91c7cd3 100644
--- a/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ b/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -449,6 +449,9 @@ DynamicLoaderPOSIXDYLD::ComputeLoadOffset()
         return LLDB_INVALID_ADDRESS;
 
     ModuleSP module = m_process->GetTarget().GetExecutableModule();
+    if (!module)
+        return LLDB_INVALID_ADDRESS;
+
     ObjectFile *exe = module->GetObjectFile();
     Address file_entry = exe->GetEntryPointAddress();
 
