Trying to query the mvptree on a large database. In the function _ph_query_mvptree: DP *sv1 = ph_read_datapoint(m); DP *sv2 = ph_read_datapoint(m); sv1 can be NULL. So the following line will crash: float d1 = hashdist(query,sv1);