Skip to content

Commit

Permalink
RequestHandler: fix GetCookieManager: CefBrowser reference is NULL
Browse files Browse the repository at this point in the history
Fixes upstream issue cztomczak#429

cztomczak#429
  • Loading branch information
jakogut committed May 22, 2018
1 parent 4762083 commit ee4d8a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/handlers/request_handler.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,16 @@ cdef public CefRefPtr[CefCookieManager] RequestHandler_GetCookieManager(
cdef object clientCallback
cdef PyCookieManager returnValue
try:
pyBrowser = GetPyBrowser(cefBrowser, "GetCookieManager")
if cefBrowser.get():
pyBrowser = GetPyBrowser(cefBrowser, "GetCookieManager")
else:
pyBrowser = None
pyMainUrl = CefToPyString(cefMainUrl)
if pyBrowser:
# Browser may be empty.
clientCallback = pyBrowser.GetClientCallback("GetCookieManager")
else:
clientCallback = None
if clientCallback:
returnValue = clientCallback(
browser=pyBrowser,
Expand Down

0 comments on commit ee4d8a2

Please sign in to comment.