diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-02 09:55:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-02 09:55:01 +0400 |
commit | dd86ae6e3be80131e6975aa54353e5e7454bd5b2 (patch) | |
tree | 8be94324b6cc84f0d0c252c8c21a7933b53311d8 /source/blender/editors/space_buttons/buttons_ops.c | |
parent | d8c4e59f673cae8a2090a2821730fc01d1287518 (diff) |
fix [#28296] File selector crash when with filepath property
disable browsing a file property within the file selector to avoid a crash.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index b1a25d093d2..26516bcda99 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -43,6 +43,7 @@ #include "BKE_context.h" #include "BKE_global.h" #include "BKE_main.h" +#include "BKE_report.h" #include "WM_api.h" #include "WM_types.h" @@ -160,6 +161,11 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) FileBrowseOp *fbo; char *str; + if (CTX_wm_space_file(C)) { + BKE_report(op->reports, RPT_ERROR, "Can't activate a file selector, one already open"); + return OPERATOR_CANCELLED; + } + uiFileBrowseContextProperty(C, &ptr, &prop); if(!prop) |