From e086b931ea7ab329a1142ec26c008cdb22fb065c Mon Sep 17 00:00:00 2001 From: faketruth Date: Wed, 22 Aug 2012 11:22:26 +0000 Subject: Chat history limit on the WebAdmin chat Did some refactoring on the JavaScript side of the WebAdmin chat Got rid of cRoot::sRootState Fixed a crash on the WebAdmin when a page is loaded before a world exists git-svn-id: http://mc-server.googlecode.com/svn/trunk@775 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWebAdmin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/cWebAdmin.cpp') diff --git a/source/cWebAdmin.cpp b/source/cWebAdmin.cpp index dab6fe9e8..9bb8e8e27 100644 --- a/source/cWebAdmin.cpp +++ b/source/cWebAdmin.cpp @@ -237,8 +237,11 @@ void cWebAdmin::Request_Handler(webserver::http_request* r) cPlayerAccum PlayerAccum; cWorld * World = cRoot::Get()->GetDefaultWorld(); // TODO - Create a list of worlds and players - World->ForEachPlayer(PlayerAccum); - Content.append(PlayerAccum.m_Contents); + if( World != NULL ) + { + World->ForEachPlayer(PlayerAccum); + Content.append(PlayerAccum.m_Contents); + } Content += "
"; } -- cgit v1.2.3