[Git][wxwidgets/wxwidgets][master] Fix recently introduced crash in wxFileSystem::OpenFile()

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Jul 21, 2026, 6:04:37 AM (yesterday) Jul 21
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 895028b5
    by Vadim Zeitlin at 2026-07-21T11:55:49+02:00
    Fix recently introduced crash in wxFileSystem::OpenFile()
    
    Fix the code after the changes of the recent b03850e367 (Reduce manual
    memory management in wxFileSystemHandler code, 2026-07-20) which wrongly
    destroyed the smart pointer too early.
    

1 changed file:

Changes:

  • src/common/filesys.cpp
    ... ... @@ -295,7 +295,7 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString&
    295 295
         if ( !is->IsOk() )
    
    296 296
             return nullptr;
    
    297 297
     
    
    298
    -    return new wxFSFile(is.get(),
    
    298
    +    return new wxFSFile(is.release(),
    
    299 299
                             location,
    
    300 300
                             wxEmptyString,
    
    301 301
                             GetAnchor(location)
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help Notification message regarding https://gitlab.com/wxwidgets/wxwidgets/-/commit/895028b5175c3cf7fae53b5d1480b785018df080 at 1784628275

Reply all
Reply to author
Forward
0 new messages