Fix BS issue which is occurred from using Null pointer by accident one-time scenario
authorJunghwan <junghwan.kang@samsung.com>
Fri, 31 Aug 2012 09:35:36 +0000 (18:35 +0900)
committerJunghwan <junghwan.kang@samsung.com>
Mon, 3 Sep 2012 02:31:55 +0000 (11:31 +0900)
[Title] Fix BS issue which is occurred from using Null pointer by accident one-time scenario
[Issue#] S1-7978
[Problem] BS happens
[Cause] Null pointer is used in very rare time of launching browser
[Solution] Make it to avoid to use NULL pointer
[Team] Browser UI
[Developer] Junghwan Kang
[Request] N/A

Change-Id: Ic91bd6ecb0f54e743aafc6f10a742aa50fbb1e8a

src/browser-view/browser-view.cpp

index c42f01b..bb6c65b 100755 (executable)
@@ -1849,6 +1849,11 @@ string Browser_View::get_url(Browser_Window *window)
 
 string Browser_View::get_url(void)
 {
+       if (!m_focused_window) {
+               BROWSER_LOGE("m_focused_window is NULL");
+               return std::string();
+       }
+
        const char *uri = ewk_view_uri_get(m_focused_window->m_ewk_view);
        BROWSER_LOGD("uri = [%s]", uri);