From 9846a1e56e28a5668d4a0a4076f02a9e359eef1a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 18 Feb 2012 02:52:29 +0000
Subject: Report an error if the required native Windows ODE library can't be
 found.

---
 OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'OpenSim')

diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 6ee2714..e8bb476 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -75,7 +75,10 @@ namespace OpenSim.Region.Physics.OdePlugin
                         nativeLibraryPath = "lib32/ode.dll";
 
                     m_log.DebugFormat("[ODE PLUGIN]: Loading native Windows ODE library at {0}", nativeLibraryPath);
-                    Util.LoadLibrary(nativeLibraryPath);
+
+                    if (Util.LoadLibrary(nativeLibraryPath) == IntPtr.Zero)
+                        m_log.ErrorFormat(
+                            "[ODE PLUGIN]: Couldn't find native Windows ODE library at {0}", nativeLibraryPath);
                 }
 
                 // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to
-- 
cgit v1.1