[Rawstudio-commit] r3041 - branches/rawstudio-ng-color/librawstudio

Anders Brander anders at brander.dk
Tue Jan 19 21:14:59 CET 2010


Author: abrander
Date: 2010-01-19 21:14:59 +0100 (Tue, 19 Jan 2010)
New Revision: 3041

Modified:
   branches/rawstudio-ng-color/librawstudio/rs-lens-db.c
Log:
Avoid NULL pointer dereference in rs_lens_db_get_from_identifier().

Modified: branches/rawstudio-ng-color/librawstudio/rs-lens-db.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-lens-db.c	2010-01-19 20:01:31 UTC (rev 3040)
+++ branches/rawstudio-ng-color/librawstudio/rs-lens-db.c	2010-01-19 20:14:59 UTC (rev 3041)
@@ -328,7 +328,7 @@
 		g_object_get(lens, "identifier", &rs_identifier, NULL);
 
 		/* If we got a match, raise refcount by 1 and break out of the loop */
-		if (g_str_equal(rs_identifier, identifier))
+		if (rs_identifier && g_str_equal(rs_identifier, identifier))
 		{
 			ret = g_object_ref(lens);
 			break;




More information about the Rawstudio-commit mailing list