fixed bug invalid memory write
[carveJwlIkooP6JGAAIwe30JlM.git] / menu.h
diff --git a/menu.h b/menu.h
index c9865732b6912e4a54a98106ba49ebfc59be294f..aa8e609b31c0cfbf119f4d5d6a3bfb3bef24223a 100644 (file)
--- a/menu.h
+++ b/menu.h
@@ -252,9 +252,11 @@ static void menu_trigger_item( ent_menuitem *item ){
          respawn_begin_chooser();
       }
       else if( MDL_CONST_PSTREQ( &menu.model, q, "hub" ) ){
-         srinput.state = k_input_state_resume;
-         menu_close();
-         ent_miniworld_goback();
+         if( world_static.active_instance == k_world_purpose_client ){
+            srinput.state = k_input_state_resume;
+            menu_close();
+            ent_miniworld_goback();
+         }
       }
       else if( MDL_CONST_PSTREQ( &menu.model, q, "credits" ) ){
          menu.credits_open = 1;