mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -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;
|
||||
ReturnCode res;
|
||||
|
||||
url = String_FromRawArray(item->URL);
|
||||
String_Copy(&World_TextureUrl, &url);
|
||||
url = String_FromRawArray(item->URL);
|
||||
/* Took too long to download and is no longer active texture pack */
|
||||
if (!String_Equals(&World_TextureUrl, &url)) return;
|
||||
|
||||
data = item->Data;
|
||||
len = item->Size;
|
||||
Stream_ReadonlyMemory(&mem, data, len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user