Add exception handling on get last channel 30/45630/1 accepted/tizen/tv/20150810.080448 submit/tizen/20150810.063837
authorjinwoo.shin <jw0227.shin@samsung.com>
Mon, 10 Aug 2015 02:33:02 +0000 (11:33 +0900)
committerjinwoo.shin <jw0227.shin@samsung.com>
Mon, 10 Aug 2015 02:33:02 +0000 (11:33 +0900)
Change-Id: I834bc4142264dac5179edbaa12431653d811d932
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
src/tv.c

index fdae39f..804e964 100644 (file)
--- a/src/tv.c
+++ b/src/tv.c
@@ -668,7 +668,7 @@ int tv_channel_tune(void)
        }
 
        r = tv_service_live_get_last_channel(&service_id);
-       if (r < 0) {
+       if (r < 0 || service_id < 1) {
                _ERR("failed to get current service id");
                service_id = DEFAULT_SERVICE;
        }