Loading...
libkern/c++/OSCollection.cpp xnu-1228 xnu-4570.71.2
--- xnu/xnu-1228/libkern/c++/OSCollection.cpp
+++ xnu/xnu-4570.71.2/libkern/c++/OSCollection.cpp
@@ -60,9 +60,17 @@
 
 void OSCollection::haveUpdated()
 {
-    if ( (gIOKitDebug & kOSLogRegistryMods) && (fOptions & kImmutable) )
-	OSReportWithBacktrace("Trying to change a collection in the registry");
-
+    if (fOptions & kImmutable)
+    {
+	if (!(gIOKitDebug & kOSRegistryModsMode))
+	{
+	    panic("Trying to change a collection in the registry");
+	}
+	else
+	{
+	    OSReportWithBacktrace("Trying to change a collection in the registry");
+	}
+    }
     updateStamp++;
 }