Fix crashing if you were disconnected from /hackrank,kick,or ban, and you then tried to resize game window on Direct3D9 backend (Thanks Devin)

This commit is contained in:
UnknownShadow200 2020-02-06 10:23:22 +11:00
parent e181c3ef84
commit b6f8d739cf

View File

@ -1433,11 +1433,12 @@ static void DisconnectScreen_ReconnectMessage(struct DisconnectScreen* s, String
int secsLeft = (DISCONNECT_DELAY_MS - elapsedMS) / MILLIS_PER_SEC; int secsLeft = (DISCONNECT_DELAY_MS - elapsedMS) / MILLIS_PER_SEC;
if (secsLeft > 0) { if (secsLeft > 0) {
String_Format1(msg, "Reconnect in %i", &secsLeft); return; String_Format1(msg, "Reconnect in %i", &secsLeft);
} } else {
}
String_AppendConst(msg, "Reconnect"); String_AppendConst(msg, "Reconnect");
} }
}
}
static void DisconnectScreen_UpdateDelayLeft(struct DisconnectScreen* s, double delta) { static void DisconnectScreen_UpdateDelayLeft(struct DisconnectScreen* s, double delta) {
String msg; char msgBuffer[STRING_SIZE]; String msg; char msgBuffer[STRING_SIZE];