Changeset 4336 in orxonox.OLD for orxonox/branches/physics/src/lib/gui
- Timestamp:
- May 27, 2005, 8:22:54 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/lib/gui/gui/gui_gtk.cc
r4325 r4336 1419 1419 { 1420 1420 MenuItem* tmpItem = this->firstItem; 1421 for (int i = 0; i<this->value; i++) 1422 tmpItem = tmpItem->next; 1423 1424 return tmpItem->name; 1421 for (int i = 0; i < this->value; i++) 1422 if (tmpItem) 1423 tmpItem = tmpItem->next; 1424 else 1425 break; 1426 if (tmpItem) 1427 { 1428 char* tmpName = new char[strlen(tmpItem->name)+1]; 1429 strcpy(tmpName, tmpItem->name); 1430 return tmpName; 1431 } 1432 else 1433 return NULL; 1425 1434 } 1426 1435 … … 1503 1512 1504 1513 #endif /* HAVE_GTK2 */ 1505 PRINT( 5)("%s set to: %d\n", this->title, this->value);1514 PRINT(1)("%s set to: %d\n", this->title, this->value); 1506 1515 } 1507 1516
Note: See TracChangeset
for help on using the changeset viewer.