From 7599b01962a25e79c35fa80549b2833bdc6f92bf Mon Sep 17 00:00:00 2001 From: Cedric Borgese Date: Mon, 18 Jul 2005 19:35:58 +0000 Subject: Fix a crash when the updated file are already present on the client --- src/gui/updatewindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gui/updatewindow.cpp') diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 4911261e..d133ae2b 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -32,9 +32,10 @@ #include #include #include +#include UpdaterWindow *updaterWindow; -SDL_Thread *thread; +SDL_Thread *thread = NULL; std::string updateHost = "themanaworld.org/files"; std::string currentFile = "news.txt"; bool downloadComplete = true; @@ -337,7 +338,11 @@ void updateData() break; case UPDATE_RESOURCES: if (downloadComplete) { - SDL_WaitThread(thread, NULL); + if (thread) + { + SDL_WaitThread(thread, NULL); + thread = NULL; + } if (fileIndex < files.size()) { currentFile = files[fileIndex]; -- cgit v1.2.3-70-g09d2