From b120d0a2c1f0aef4a4811f6bd9b416023a3bfc20 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 5 Mar 2019 21:10:39 +0100 Subject: [PATCH] #4172 libecl : Return std::string instead of NULL libecl crashes when NULL is returned from a function returning std::string --- ThirdParty/Ert/lib/ecl/smspec_node.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ThirdParty/Ert/lib/ecl/smspec_node.cpp b/ThirdParty/Ert/lib/ecl/smspec_node.cpp index 786dd87430..98bf35b597 100644 --- a/ThirdParty/Ert/lib/ecl/smspec_node.cpp +++ b/ThirdParty/Ert/lib/ecl/smspec_node.cpp @@ -188,7 +188,7 @@ std::string smspec_alloc_completion_ijk_key( const char * join_string , const st join_string , i , j , k ); else - return NULL; + return std::string(); } @@ -202,7 +202,7 @@ std::string smspec_alloc_completion_num_key( const char * join_string , const st join_string , num ); else - return NULL; + return std::string(); } /* @@ -265,7 +265,7 @@ std::string smspec_alloc_segment_key( const char * join_string , const std::stri join_string , num ); else - return NULL; + return std::string(); } @@ -278,7 +278,7 @@ std::string smspec_alloc_local_well_key( const char * join_string , const std::s join_string , wgname.c_str()); else - return NULL; + return std::string(); } std::string smspec_alloc_local_completion_key( const char * join_string, const std::string& keyword , const std::string& lgr_name , const std::string& wgname , int i , int j , int k) { @@ -292,7 +292,7 @@ std::string smspec_alloc_local_completion_key( const char * join_string, const s join_string , i,j,k); else - return NULL; + return std::string(); } /*****************************************************************/