diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-31 07:53:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-31 07:53:34 +0300 |
commit | ac9e1e692cecc98f3547386cfee5eb7d9df3b8a4 (patch) | |
tree | c73804b00d7fa616d797cfd0aeeef790954d32fe /source/blender/python | |
parent | b1ccb6ad25b82acf424e9c6130a6e83568a5d37e (diff) | |
parent | 976f14fbcf78a87011ec09e76573cc62b44b6da6 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index a5315a527a0..5a908f866a0 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -628,13 +628,10 @@ bool BPY_execute_string_as_number(bContext *C, const char *expr, const bool verb */ bool BPY_execute_string_as_string(bContext *C, const char *expr, const bool verbose, char **r_value) { + BLI_assert(r_value && expr); PyGILState_STATE gilstate; bool ok = true; - if (!r_value || !expr) { - return -1; - } - if (expr[0] == '\0') { *r_value = NULL; return ok; @@ -665,13 +662,10 @@ bool BPY_execute_string_as_string(bContext *C, const char *expr, const bool verb */ bool BPY_execute_string_as_intptr(bContext *C, const char *expr, const bool verbose, intptr_t *r_value) { + BLI_assert(r_value && expr); PyGILState_STATE gilstate; bool ok = true; - if (!r_value || !expr) { - return -1; - } - if (expr[0] == '\0') { *r_value = 0; return ok; @@ -697,14 +691,13 @@ bool BPY_execute_string_as_intptr(bContext *C, const char *expr, const bool verb bool BPY_execute_string_ex(bContext *C, const char *expr, bool use_eval) { + BLI_assert(expr); PyGILState_STATE gilstate; PyObject *main_mod = NULL; PyObject *py_dict, *retval; bool ok = true; Main *bmain_back; /* XXX, quick fix for release (Copy Settings crash), needs further investigation */ - if (!expr) return -1; - if (expr[0] == '\0') { return ok; } |