mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 02:56:09 -04:00
Don't apply downloaded texture pack if the URL changes, fixes #426
This can happen if texture pack takes a long time to download and the user changes maps.
This commit is contained in:
parent
0f425a8a70
commit
d78b31a941
@ -734,8 +734,10 @@ void TexturePack_Extract_Req(struct HttpRequest* item) {
|
|||||||
bool png;
|
bool png;
|
||||||
ReturnCode res;
|
ReturnCode res;
|
||||||
|
|
||||||
url = String_FromRawArray(item->URL);
|
url = String_FromRawArray(item->URL);
|
||||||
String_Copy(&World_TextureUrl, &url);
|
/* Took too long to download and is no longer active texture pack */
|
||||||
|
if (!String_Equals(&World_TextureUrl, &url)) return;
|
||||||
|
|
||||||
data = item->Data;
|
data = item->Data;
|
||||||
len = item->Size;
|
len = item->Size;
|
||||||
Stream_ReadonlyMemory(&mem, data, len);
|
Stream_ReadonlyMemory(&mem, data, len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user