From 6cfd91a8f0a367946ec73f537ef4bb112f1283cc Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Fri, 9 Jan 2009 22:09:36 -0700 Subject: Fixed a potential crash in the setup window when setting whether a name is viewable or not, and the player doesn't exist yet. Signed-off-by: Ira Rice --- src/gui/setup_video.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index a23f5923..afc7b1b5 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -461,7 +461,8 @@ void Setup_Video::action(const gcn::ActionEvent &event) { // Notify the local player that settings have changed for the name // and requires an update - player_node->mUpdateName = true; + if (player_node) + player_node->mUpdateName = true; config.setValue("showownname", mNameCheckBox->isSelected() ? 1 : 0); } -- cgit v1.2.3-70-g09d2