Skip to content

Commit

Permalink
RemovableManager on OSX: Testing for dictionary values for nullness.
Browse files Browse the repository at this point in the history
Hopefully it fixes Can not start slicer on mac Bigsur prusa3d#5719
  • Loading branch information
bubnikv committed Apr 15, 2021
1 parent 4e5e4d4 commit 5061124
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/slic3r/GUI/RemovableDriveManagerMM.mm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ -(NSArray*) list_dev
NSLog(@"-%@",(CFStringRef)deviceModelKey);
*/
if (mediaEjectableKey != nullptr) {
BOOL op = ejectable && (CFEqual(deviceProtocolName, CFSTR("USB")) || CFEqual(deviceModelKey, CFSTR("SD Card Reader")) || CFEqual(deviceProtocolName, CFSTR("Secure Digital")));
BOOL op = ejectable &&
( (deviceProtocolName != nullptr && (CFEqual(deviceProtocolName, CFSTR("USB")) || CFEqual(deviceProtocolName, CFSTR("Secure Digital")))) ||
(deviceModelKey != nullptr && CFEqual(deviceModelKey, CFSTR("SD Card Reader"))) );
//!CFEqual(deviceModelKey, CFSTR("Disk Image"));
if (op)
[result addObject:volURL.path];
Expand Down

0 comments on commit 5061124

Please sign in to comment.