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:
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;
|
||||
|
Loading…
Reference in New Issue
Block a user