Skip to content

Instantly share code, notes, and snippets.

@ariya
Created June 18, 2012 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariya/2950246 to your computer and use it in GitHub Desktop.
Save ariya/2950246 to your computer and use it in GitHub Desktop.
null stack in ChromeClient
diff --git a/src/qt/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/qt/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index c8e40e6..fe98941 100644
--- a/src/qt/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/qt/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -305,7 +305,9 @@ void ChromeClientQt::addMessageToConsole(MessageSource src, MessageType type, Me
// the MessageType value isn't useful - it will be LogMessageType for both errors
// and log messages.
if (level == ErrorMessageLevel) {
- QString stack = callStack->buildInspectorArray()->toJSONString();
+ QString stack = "[]";
+ if (callStack)
+ callStack->buildInspectorArray()->toJSONString();
m_webPage->javaScriptError(x, lineNumber, y, stack);
} else {
m_webPage->javaScriptConsoleMessage(x, lineNumber, y);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment