diff options
Diffstat (limited to 'captain/queryutils.f90')
-rw-r--r-- | captain/queryutils.f90 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/captain/queryutils.f90 b/captain/queryutils.f90 index 5e97023..e59713f 100644 --- a/captain/queryutils.f90 +++ b/captain/queryutils.f90 @@ -66,6 +66,7 @@ contains if(i_equals == 0) then allocate(character(len=len_trim(decoded)) :: self%value) self%value = decoded + self%key => null() else allocate(character(len=i_equals-1) :: self%key) self%key = decoded(1:i_equals-1) @@ -200,8 +201,10 @@ contains integer::i do i = 1, self%component_count() - if(associated(self%components(i)%key) .and. self%components(i)%key == trim(k)) then - res => get_query_value_from_index(self, i) + if(self%components(i)%has_key()) then + if(self%components(i)%key == trim(k)) then + res => get_query_value_from_index(self, i) + end if end if end do |