bug(snipper): Solved segmentation bug with query.cc

Segmentation bug was due to a wrong if condition. Didn't put in right if condition.
changed it to right if condition, now there is no segmentation fault.