Skip to content

Commit

Permalink
Bug 799300 - Nullpointer exception in gnc_quote_source_s
Browse files Browse the repository at this point in the history
avoids constructing std::string with nullptr
  • Loading branch information
christopherlam committed May 4, 2024
1 parent d358998 commit 949c9c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libgnucash/engine/gnc-commodity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ struct gnc_quote_source_s
const char* username, const char* int_name)
: m_supported{supported}
, m_type{type}
, m_user_name{username}
, m_internal_name{int_name} { };
, m_user_name{username ? username : ""}
, m_internal_name{int_name ? int_name: ""} { };
};

using QuoteSourceVec = std::vector<gnc_quote_source>;
Expand Down

0 comments on commit 949c9c9

Please sign in to comment.