[Bf-blender-cvs] [84cc68b68f5] temp-asset-representation: Fix uninitialized variable use when dragging in assets

Julian Eisel noreply at git.blender.org
Tue Nov 8 15:14:26 CET 2022


Commit: 84cc68b68f5d11ddc7b132e7d76b99715d590eb5
Author: Julian Eisel
Date:   Tue Nov 8 15:14:07 2022 +0100
Branches: temp-asset-representation
https://developer.blender.org/rB84cc68b68f5d11ddc7b132e7d76b99715d590eb5

Fix uninitialized variable use when dragging in assets

===================================================================

M	source/blender/blenkernel/BKE_asset_representation.hh

===================================================================

diff --git a/source/blender/blenkernel/BKE_asset_representation.hh b/source/blender/blenkernel/BKE_asset_representation.hh
index d2e167b3f35..2acf30fbc88 100644
--- a/source/blender/blenkernel/BKE_asset_representation.hh
+++ b/source/blender/blenkernel/BKE_asset_representation.hh
@@ -22,10 +22,10 @@ namespace blender::bke {
  */
 class AssetRepresentation {
   /** Null if the asset represents a local ID, in which case the ID owns the metadata. */
-  std::unique_ptr<AssetMetaData> metadata_;
+  std::unique_ptr<AssetMetaData> metadata_ = nullptr;
   /** If the asset representation was constructed from a local ID, this points to the editable
    * asset metadata of the ID. */
-  AssetMetaData *local_id_metadata_; /* Non-owning. */
+  AssetMetaData *local_id_metadata_ = nullptr; /* Non-owning. */
 
  public:
   explicit AssetRepresentation(std::unique_ptr<AssetMetaData> metadata);



More information about the Bf-blender-cvs mailing list