diff --git a/src/main.cpp b/src/main.cpp index 1cc24acd..34993fe2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3530,6 +3530,8 @@ static bool CreateSpamMsgTx(CTransaction &txNew, std::vector &sal if( pwalletMain->vchDefaultKey.IsValid() ) { keyID = pwalletMain->vchDefaultKey.GetID(); strUsername = pwalletMain->mapKeyMetadata[keyID].username; + } else { + strUsername = "nobody"; } } printf("CreateSpamMsgTx: keyId = %s\n", keyID.ToString().c_str() );