Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > a0866a9248c9ef683aeba12292195a46 > files > 4

libx11-1.6.5-1.mga5.src.rpm

Index: libX11-1.4.99.1/src/Xrm.c
===================================================================
--- libX11-1.4.99.1.orig/src/Xrm.c
+++ libX11-1.4.99.1/src/Xrm.c
@@ -2540,30 +2540,40 @@ Bool XrmQGetResource(
     VClosureRec closure;
 
     if (db && *names) {
-	_XLockMutex(&db->linfo);
+	if ((_XLockMutex_fn) && db->linfo.lock ) {
+	    _XLockMutex(&db->linfo);
+	}
 	closure.type = pType;
 	closure.value = pValue;
 	table = db->table;
 	if (names[1]) {
 	    if (table && !table->leaf) {
 		if (GetNEntry(table, names, classes, &closure)) {
-		    _XUnlockMutex(&db->linfo);
+		    if ((_XUnlockMutex_fn) && db->linfo.lock ) {
+		        _XUnlockMutex(&db->linfo);
+		    }
 		    return True;
 		}
 	    } else if (table && table->hasloose &&
 		    GetLooseVEntry((LTable)table, names, classes, &closure)) {
-		_XUnlockMutex (&db->linfo);
+		if ((_XUnlockMutex_fn) && db->linfo.lock ) {
+		    _XUnlockMutex (&db->linfo);
+		}
 		return True;
 	    }
 	} else {
 	    if (table && !table->leaf)
 		table = table->next;
 	    if (table && GetVEntry((LTable)table, names, classes, &closure)) {
-		_XUnlockMutex(&db->linfo);
+		if ((_XUnlockMutex_fn) && db->linfo.lock ) {
+		    _XUnlockMutex(&db->linfo);
+		}
 		return True;
 	    }
 	}
-	_XUnlockMutex(&db->linfo);
+	if ((_XUnlockMutex_fn) && db->linfo.lock ) {
+	    _XUnlockMutex(&db->linfo);
+	}
     }
     *pType = NULLQUARK;
     pValue->addr = (XPointer)NULL;