Skip to content

Commit f83762a

Browse files
committed
Check allocation status before allocating
1 parent 56da54f commit f83762a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fpm_settings.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ subroutine get_global_settings(global_settings, error)
113113
subroutine use_default_registry_settings(global_settings)
114114
type(fpm_global_settings), intent(inout) :: global_settings
115115

116-
allocate (global_settings%registry_settings)
116+
if (.not. allocated(global_settings%registry_settings)) allocate (global_settings%registry_settings)
117117
global_settings%registry_settings%url = official_registry_base_url
118118
global_settings%registry_settings%cache_path = join_path(global_settings%path_to_config_folder_or_empty(), &
119119
& 'dependencies')

0 commit comments

Comments
 (0)