ObjFW  Check-in [c6e0123999]

Overview
Comment:+[OFThread threadDictionary]: Handle nil thread
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.90
Files: files | file ages | folders
SHA3-256: c6e0123999219471832b7bf49a2197e43c276a86ca7736e41794444d1f3d55a7
User & Date: js on 2017-11-04 20:56:43
Other Links: branch diff | manifest | tags
Context
2017-11-04
20:57
-[OFXMLElement setChildren:]: Create mutable copy check-in: 810e9a1f43 user: js tags: 0.90
20:56
+[OFThread threadDictionary]: Handle nil thread check-in: c6e0123999 user: js tags: 0.90
20:54
Backport more nullability fixes check-in: 903530213a user: js tags: 0.90
Changes

Modified src/OFThread.m from [3fc1c7c412] to [a4d40e057a].

171
172
173
174
175
176
177



178
179
180
181
182
183
184
{
	return mainThread;
}

+ (OFMutableDictionary *)threadDictionary
{
	OFThread *thread = of_tlskey_get(threadSelfKey);




	if (thread->_threadDictionary == nil)
		thread->_threadDictionary = [[OFMutableDictionary alloc] init];

	return thread->_threadDictionary;
}
#endif







>
>
>







171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
	return mainThread;
}

+ (OFMutableDictionary *)threadDictionary
{
	OFThread *thread = of_tlskey_get(threadSelfKey);

	if (thread == nil)
		return nil;

	if (thread->_threadDictionary == nil)
		thread->_threadDictionary = [[OFMutableDictionary alloc] init];

	return thread->_threadDictionary;
}
#endif