diff --git a/src/ivoc/scene.cpp b/src/ivoc/scene.cpp index eefd653936..ceb44f768b 100644 --- a/src/ivoc/scene.cpp +++ b/src/ivoc/scene.cpp @@ -745,11 +745,11 @@ void Scene::pick(Canvas* c, const Allocation& a, int depth, Hit& h) { } long Scene::scene_list_index(Scene* s) { - auto it = std::find(scene_list.begin(), scene_list.end(), s); - if (it == scene_list.end()) { + auto it = std::find(scene_list->begin(), scene_list->end(), s); + if (it == scene_list->end()) { return -1; } - return std::distance(scene_list.begin(), it); + return std::distance(scene_list->begin(), it); } void Scene::save_all(std::ostream& o) {