Skip to content

Commit

Permalink
Check allocation status before allocating
Browse files Browse the repository at this point in the history
  • Loading branch information
minhqdao committed Jun 22, 2023
1 parent 56da54f commit f83762a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fpm_settings.f90
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ subroutine get_global_settings(global_settings, error)
subroutine use_default_registry_settings(global_settings)
type(fpm_global_settings), intent(inout) :: global_settings

allocate (global_settings%registry_settings)
if (.not. allocated(global_settings%registry_settings)) allocate (global_settings%registry_settings)
global_settings%registry_settings%url = official_registry_base_url
global_settings%registry_settings%cache_path = join_path(global_settings%path_to_config_folder_or_empty(), &
& 'dependencies')
Expand Down

0 comments on commit f83762a

Please sign in to comment.