From 745cfdd3a0f08eb197f544edd950f019c90f84b8 Mon Sep 17 00:00:00 2001
From: ravkr <rav_kr@interia.pl>
Date: Sun, 03 Jun 2018 10:24:11 +0000
Subject: [PATCH] Fix error when feature_clicked is null

---
 map.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/map.js b/map.js
index b543fb4..0c553fb 100644
--- a/map.js
+++ b/map.js
@@ -170,7 +170,7 @@
 			if(vehicle.isDeleted) {
 				if(vehicle_feature) {
 					vehicles_source.removeFeature(vehicle_feature);
-					if(feature_clicked.getId() == vehicle_feature.getId()) {
+					if(feature_clicked && feature_clicked.getId() === vehicle_feature.getId()) {
 						featureClicked();
 					}
 				}

--
Gitblit v1.9.1