Another bug found by klockwork.com

This one is just a simple test to make sure a malloc works before using
the variable allocated.

Kent
This commit is contained in:
Kent Mein 2006-10-24 16:42:12 +00:00
parent 0360be49f5
commit 00b2d4f052

@ -497,6 +497,8 @@ char* GHOST_GetTitle(GHOST_WindowHandle windowhandle)
window->getTitle(title);
char *ctitle = (char*) malloc(title.Length() + 1);
if (ctitle == NULL) return NULL;
strcpy(ctitle, title.Ptr());
return ctitle;