Fix crash when specifying an invalid repo with -r
Fix crash when specifying an invalid repo with -r

Fixes:	#533

junovitch/pkg,en90/pkg,khorben/pkg,junovitch/pkg,Open343/pkg,en90/pkg,Open343/pkg,khorben/pkg,skoef/pkg,khorben/pkg,skoef/pkg