fix search crash on non opened file

r2 --
/ blah
[segfaultz]