Skip to content

Commit

Permalink
Fixed potential memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
latenitefilms committed Aug 3, 2023
1 parent 07ba144 commit 05e1f3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Gyroflow/Plugin/GyroflowPlugIn.m
Original file line number Diff line number Diff line change
Expand Up @@ -2909,7 +2909,7 @@ - (void)buttonReloadGyroflowProject {
//---------------------------------------------------------
// Gyroflow Project file exists:
//---------------------------------------------------------
defaultFolderURL = [gyroflowProjectURL copy];
defaultFolderURL = gyroflowProjectURL;
} else {
//---------------------------------------------------------
// If the Gyroflow Project path doesn't exist, try the
Expand Down Expand Up @@ -3799,7 +3799,7 @@ - (BOOL)importMediaWithOptionalURL:(NSURL*)optionalURL {
NSString *desktopPath = [[self getUserHomeDirectoryPath] stringByAppendingString:@"/Desktop/"];
NSURL *defaultFolderURL = [NSURL fileURLWithPath:desktopPath];
if (optionalURL) {
defaultFolderURL = [optionalURL copy];
defaultFolderURL = optionalURL;
} else {
NSString *lastImportMediaPath = [userDefaults stringForKey:@"lastImportMediaPath"];
if ([fileManager fileExistsAtPath:lastImportMediaPath]) {
Expand Down Expand Up @@ -4174,7 +4174,7 @@ - (void)importGyroflowProjectWithOptionalURL:(NSURL*)optionalURL {
NSString *desktopPath = [[self getUserHomeDirectoryPath] stringByAppendingString:@"/Desktop/"];
NSURL *defaultFolderURL = [NSURL fileURLWithPath:desktopPath];
if (optionalURL) {
defaultFolderURL = [optionalURL copy];
defaultFolderURL = optionalURL;
} else {
NSString *lastImportGyroflowProjectPath = [userDefaults stringForKey:@"lastImportGyroflowProjectPath"];
if ([fileManager fileExistsAtPath:lastImportGyroflowProjectPath]) {
Expand Down Expand Up @@ -4797,7 +4797,7 @@ - (NSDictionary *)getLensProfileIdentifiersFromDirectory:(NSString *)directoryPa
}
}

return [result copy];
return result;
}

//---------------------------------------------------------
Expand Down

0 comments on commit 05e1f3a

Please sign in to comment.