Skip to content

Commit 6e2269a

Browse files
Thread-safe PNG decode: use thread_local instance/buffer (#103)
1 parent c749923 commit 6e2269a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OpenStreetMap-esp32.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class OpenStreetMap
116116
static void tileFetcherTask(void *param);
117117
static void PNGDraw(PNGDRAW *pDraw);
118118

119-
static inline OpenStreetMap *currentInstance = nullptr;
119+
static inline thread_local OpenStreetMap *currentInstance = nullptr;
120120
static inline thread_local uint16_t *currentTileBuffer = nullptr;
121121
const TileProvider *currentProvider = &tileProviders[0];
122122
std::vector<CachedTile> tilesCache;

0 commit comments

Comments
 (0)