Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2006-10-24 20:42:12 +0400
committerKent Mein <mein@cs.umn.edu>2006-10-24 20:42:12 +0400
commit00b2d4f052c9a35fd8d682344d00955eebb0eccc (patch)
tree4de310dcd2230b808daced4f0547e4a55026dd20 /intern
parent0360be49f5018dead60b0d2fd637d828420c830e (diff)
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
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_C-api.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index fbb4cca91e0..c2b8eca9573 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -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;