Fix bugs about checking pre-created context handle 94/229794/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 3 Apr 2020 10:11:31 +0000 (19:11 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 3 Apr 2020 10:11:31 +0000 (19:11 +0900)
Change-Id: Ida9c9392dda33835ab423aa0a74142e734f39fa0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
frame-broker/src/frame_broker.c

index 82022b9..30372ac 100644 (file)
@@ -176,6 +176,7 @@ static void __scls_prepare_cb(screen_connector_launcher_service_image_h image,
        if (context == NULL) {
                if (broker->pre_context) {
                        __check_pre_context(broker);
+                       context = broker->context;
                } else {
                        _E("Invalid context");
                        return;
@@ -204,6 +205,7 @@ static void __scls_stop_cb(uint32_t serial, void *user_data)
        if (context == NULL) {
                if (broker->pre_context) {
                        __check_pre_context(broker);
+                       context = broker->context;
                } else {
                        _E("Invalid context");
                        return;
@@ -238,6 +240,7 @@ static void __scls_error_cb(screen_connector_launcher_service_error_e error,
        if (context == NULL) {
                if (broker->pre_context) {
                        __check_pre_context(broker);
+                       context = broker->context;
                } else {
                        _E("Invalid context");
                        return;