Changeset 5125 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Aug 25, 2005, 3:04:49 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine.cc
r5124 r5125 120 120 } 121 121 else 122 { 123 this->text = new char[1]; 124 *this->text = '\0'; 125 } 122 this->text = NULL; 126 123 } 127 124 … … 135 132 if (this->externText == NULL) 136 133 tmpText = this->text; 137 while (*tmpText != '\0') 134 if (tmpText != NULL) 135 { 136 while (*tmpText != '\0') 138 137 { 139 138 if(glyphArray[*tmpText]) 140 141 142 139 { 140 width += glyphArray[*tmpText]->width; 141 } 143 142 tmpText++; 144 143 } 145 this->width = width; 144 this->width = width; 145 } 146 146 } 147 147 } … … 205 205 if (this->externText == NULL) 206 206 tmpText = this->text; 207 while (*tmpText != '\0')207 if (likely(tmpText != NULL)) 208 208 { 209 if(glyphArray[*tmpText])209 while (*tmpText != '\0') 210 210 { 211 glCallList(glyphArray[*tmpText]->displayList); 212 glTranslatef(glyphArray[*tmpText]->width, 0, 0); 211 if(glyphArray[*tmpText]) 212 { 213 glCallList(glyphArray[*tmpText]->displayList); 214 glTranslatef(glyphArray[*tmpText]->width, 0, 0); 215 } 216 tmpText++; 213 217 } 214 tmpText++;215 }}218 } 219 } 216 220 else //(if type & TEXT_RENDER_STATIC) 217 221 {
Note: See TracChangeset
for help on using the changeset viewer.