Adds `U_ASSERT` check before using `m->lock()` to make allocation issues
more apparent at least in debug builds.
There is probably quite a few places like this, but let's try fixing
broken windows.
gListHead = this;
}
}
+ U_ASSERT(retPtr != nullptr);
return retPtr;
}
static UMutex *gListHead;
/** Out-of-line function to lazily initialize a UMutex on first use.
- * Initial fast check is inline, in lock().
+ * Initial fast check is inline, in lock(). The returned value may never
+ * be nullptr.
*/
std::mutex *getMutex();
};