Skip to content
  • Alexander Saoutkin's avatar
    [KIO-MTP] Fix null pointer dereference · 94e7b643
    Alexander Saoutkin authored
    Summary:
    A null pointer can be returned from getDevice() if a device is disconnected.
    Passing NULL into LIBMTP_Get_Storage() results in a NULL pointer dereference.
    
    BUG: 405838
    
    Test Plan:
    Compiles. I couldn't reproduce this as described in the bug report, but from
    reading the attached stacktrace in the bug report it's obvious what went wrong
    here.
    
    Reviewers: akrutzler, dfaure, elvisangelaccio
    
    Reviewed By: elvisangelaccio
    
    Subscribers: anthonyfieroni, kde-frameworks-devel, fvogt, kfm-devel, ngraham
    
    Tags: #dolphin, #frameworks
    
    Differential Revision: https://phabricator.kde.org/D28535
    94e7b643