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
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-07-01 13:52:00 +0300
committerCampbell Barton <campbell@blender.org>2022-07-01 13:54:47 +0300
commitb683a37824aa2fb22efe22a1dbce667b8155698f (patch)
treea13f2e7372bd6492c5f8a929a669be8958506cb7
parent5e5fe217caaed35d6a39744d4f22b38793beae8f (diff)
Fix T99301: RNA_boolean_get warning when saving a file for the first time
Caused by [0], RNA_struct_property_is_set also functioned to check if the property existed. [0]: 6a2c42a0d58e0f36cca1cf4ca0c5c98ec3612f6f
-rw-r--r--source/blender/windowmanager/intern/wm_files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 5f4c39e33f7..a4d5bed21da 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -3063,7 +3063,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
Main *bmain = CTX_data_main(C);
char path[FILE_MAX];
const bool is_save_as = (op->type->invoke == wm_save_as_mainfile_invoke);
- const bool use_save_as_copy = RNA_boolean_get(op->ptr, "copy");
+ const bool use_save_as_copy = is_save_as && RNA_boolean_get(op->ptr, "copy");
/* We could expose all options to the users however in most cases remapping
* existing relative paths is a good default.