From 4c70387bc63794d10f7d8df3b7ceb04233fd2ddf Mon Sep 17 00:00:00 2001
From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
Date: Fri, 28 Dec 2018 17:29:05 -0500
Subject: [PATCH] fix: return value for contact name

Return empty string if could not find contact

Change-Id: Ia48a6703ca79f07fa01ee605a9a94d348ed38f02
---
 src/utils.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/utils.h b/src/utils.h
index 9e1bfc43..75a7c7ba 100755
--- a/src/utils.h
+++ b/src/utils.h
@@ -45,6 +45,7 @@ static inline NSString* bestIDForConversation(const lrc::api::conversation::Info
         }
     } catch (std::out_of_range& e) {
         NSLog(@"bestIDForConversation: getContact - out of range");
+        return @"";
     }
 }
 
@@ -96,6 +97,7 @@ static inline NSString* bestNameForConversation(const lrc::api::conversation::In
         return @(alias.c_str());
     } catch (std::out_of_range& e) {
         NSLog(@"bestNameForConversation: getContact - out of range");
+        return @"";
     }
 }
 
-- 
GitLab