From: Anders R. <ma...@us...> - 2003-11-01 14:21:54
|
Update of /cvsroot/planeshift/planeshift/src/client In directory sc8-pr-cvs1:/tmp/cvs-serv17127/src/client Modified Files: entitylabels.cpp Log Message: Fixed a core dump with a null pointer in the new lable code. Index: entitylabels.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/entitylabels.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** entitylabels.cpp 1 Nov 2003 13:31:31 -0000 1.1 --- entitylabels.cpp 1 Nov 2003 14:21:51 -0000 1.2 *************** *** 226,230 **** for (i=0; i < rows.Length(); i++) { ! font->GetDimensions(rows[i].text, rows[i].width, rows[i].height); rows[i].y = labelHeight; labelWidth = MAX(rows[i].width, labelWidth); --- 226,237 ---- for (i=0; i < rows.Length(); i++) { ! if (rows[i].text) ! font->GetDimensions(rows[i].text, rows[i].width, rows[i].height); ! else ! { ! rows[i].width = 0; ! rows[i].height = 0; ! } ! rows[i].y = labelHeight; labelWidth = MAX(rows[i].width, labelWidth); |