Commits

Anonymous committed 9aac06e

Fixed crasher in the exception bridging code.

Comments (0)

Files changed (2)

 2002-10-17  Bill Bumgarner  <bbum@codefab.com>
+	* Fixed a situation where ObjCErr_ToObjC() would crash if the
+	exception lacked a value or traceback.
+
 	* propertyListFromPythonCollection() takes an optional kv argument
 	that is used as a helper function when the type to be converted in
 	the python collection is not recognized.   For example, the

pyobjc/Modules/objc/objc_util.m

 				     userInfo:userInfo];
 			Py_DECREF(args);
 			Py_DECREF(exc_type);
-			Py_DECREF(exc_value);
-			Py_DECREF(exc_traceback);
+			if (exc_value)
+			  Py_DECREF(exc_value);
+			if (exc_traceback)
+			  Py_DECREF(exc_traceback);
 
 			[val raise];
 		}
 
 	Py_DECREF(repr);
 	Py_DECREF(exc_type);
-	Py_DECREF(exc_value);
-	Py_DECREF(exc_traceback);
+	if (exc_value)
+	  Py_DECREF(exc_value);
+	if (exc_traceback)
+	  Py_DECREF(exc_traceback);
 
 	[val raise];
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.