small segfault bug fix
authorPerttu Ahola <celeron55@gmail.com>
Fri, 24 Dec 2010 01:15:24 +0000 (03:15 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 24 Dec 2010 01:15:24 +0000 (03:15 +0200)
src/main.cpp

index 29ff2748cb174f8b6f25770490e23f438f20c8af..ac91b9d3dd44630c4418eccf420f845cb53e9151 100644 (file)
@@ -177,9 +177,8 @@ TODO: Check if the usage of Client::isFetchingBlocks() in
 Doing now:\r
 ======================================================================\r
 \r
-TODO: Tool items\r
-\r
-- Actually, tool items should be just a little special MapBlockItems\r
+TODO: Tool capability table\r
+TODO: Transferring of the table from server to client\r
 \r
 ======================================================================\r
 \r
@@ -2109,7 +2108,7 @@ int main(int argc, char *argv[])
                                                if(mlist != NULL)\r
                                                {\r
                                                        InventoryItem *item = mlist->getItem(g_selected_item);\r
-                                                       if((std::string)item->getName() == "ToolItem")\r
+                                                       if(item && (std::string)item->getName() == "ToolItem")\r
                                                        {\r
                                                                ToolItem *titem = (ToolItem*)item;\r
                                                                if(titem->getToolName() == "WPick")\r