fix search crash on non opened file

r2 --
/ blah
[segfaultz]

this fixes it