csapi-sensor: check if the sensor is started or not when Stop() is called
authorkibak.yoon <kibak.yoon@samsung.com>
Thu, 27 Oct 2016 03:26:57 +0000 (12:26 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Thu, 27 Oct 2016 03:26:57 +0000 (12:26 +0900)
Change-Id: I2674d2e5e78f092fe8108779f4712ce28c4b3d5d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Tizen.Sensor/Tizen.Sensor/Sensor.cs

index 041d58126ed410f8b22f3bf82f4c6a8915426c00..5589d43c8d757a7aba57707bb1e806052051e0ef 100755 (executable)
@@ -303,7 +303,7 @@ namespace Tizen.Sensor
         public void Stop()
         {
             Log.Info(Globals.LogTag, "Stopping the sensor");
-            if (CheckListenerHandle())
+            if (_isSensing)
             {
                 int error = Interop.SensorListener.StopListener(_listenerHandle);
                 if (error != (int)SensorError.None)