Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit e8c8aef

Browse files
committed
Merge branch 'bugfix-12701' into develop
2 parents 677650b + 301f287 commit e8c8aef

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

docs/notes/bugfix-12701.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# CEF browser crashes if htmltext is set to empty

revbrowser/src/cefbrowser.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,11 @@ char *MCCefBrowserBase::GetSource(void)
11201120

11211121
void MCCefBrowserBase::SetSource(const char *p_source)
11221122
{
1123+
// IM-2014-06-25: [[ Bug 12701 ]] CEF will crash if given an empty source string,
1124+
// so replace here with the source of an empty page :)
1125+
if (p_source == nil || MCCStringLength(p_source) == 0)
1126+
p_source = "<html><head></head><body></body></html>";
1127+
11231128
CefString t_source;
11241129
/* UNCHECKED */ MCCefStringFromCString(p_source, t_source);
11251130

0 commit comments

Comments
 (0)