Avoiding referencing elements of an empty vector
Avoiding referencing elements of an empty vector

(cherry picked from commit 459a2d25e0c91d1650974900a902285bedb85f39)

reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin,reddcoin-project/reddcoin