diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-08-23 13:37:58 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-08-23 13:37:58 +0400 |
commit | 866218eb15f3ed7beb71f461ee0de051abc398a5 (patch) | |
tree | b09c0a8eb44dd0ecc064f8cbee573ddafea87723 /source/blender/src/editipo_lib.c | |
parent | 6cd036ed4403beeddf6a4bf31249e7e90826f043 (diff) |
Fix for a compiler warning caused by one of my commits yesterday.
Diffstat (limited to 'source/blender/src/editipo_lib.c')
-rw-r--r-- | source/blender/src/editipo_lib.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/src/editipo_lib.c b/source/blender/src/editipo_lib.c index 47bd06664c2..f10e100df7d 100644 --- a/source/blender/src/editipo_lib.c +++ b/source/blender/src/editipo_lib.c @@ -150,15 +150,11 @@ char *getname_ipocurve(IpoCurve *icu, Object *ob) Key *key= ob_get_key(ob); KeyBlock *kb= key_get_keyblock(key, icu->adrcode); - if (kb) { - /* only return name if it has been set, otherwise use - * default method using static string (Key #) - */ - if (kb->name[0] == '\0') - break; /* stop looping through keyblocks */ - else - return kb->name; /* return keyblock's name */ - } + /* only return name if it has been set, otherwise use + * default method using static string (Key #) + */ + if ((kb) && (kb->name[0] != '\0')) + return kb->name; /* return keyblock's name */ /* in case keyblock is not named or no key/keyblock was found */ sprintf(name, "Key %d", icu->adrcode); |