Skip to content

Wrong delete overload used in CCGLViewImpl-desktop.cpp #19577

@JohnCoconut

Description

@JohnCoconut

In file cocos/platform/desktop/CCGLViewImpl-desktop.cpp,

void GLViewImpl::setIcon(const std::vector<std::string>& filelist) const {                                                                                                                                                                                                                                               
   /* omitted */                                                                                                                                                      
                                                                                                                                
    auto images = new GLFWimage[iconsCount];                                                                                                                                  
   /* omitted */         
                                                                                                                                                                                                                                                                                                                                                                                                                                                     
    CC_SAFE_DELETE(images);                                                                                                                                                   
   /* omitted */                                                                                                                              
}   

Should use CC_SAFE_DELETE_ARRAY instead of CC_SAFE_DELETE.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions