diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/ContextMenu.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/ContextMenu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/ContextMenu.cpp b/src/3rdparty/webkit/WebCore/platform/ContextMenu.cpp index 21fa7dfe77..ee6aa4e277 100644 --- a/src/3rdparty/webkit/WebCore/platform/ContextMenu.cpp +++ b/src/3rdparty/webkit/WebCore/platform/ContextMenu.cpp @@ -361,10 +361,10 @@ void ContextMenu::populate() appendItem(StopItem); appendItem(ReloadItem); #else - if (loader->canGoBackOrForward(-1)) + if (frame->page() && frame->page()->canGoBackOrForward(-1)) appendItem(BackItem); - if (loader->canGoBackOrForward(1)) + if (frame->page() && frame->page()->canGoBackOrForward(1)) appendItem(ForwardItem); // use isLoadingInAPISense rather than isLoading because Stop/Reload are @@ -721,10 +721,10 @@ void ContextMenu::checkOrEnableIfNeeded(ContextMenuItem& item) const #endif #if PLATFORM(GTK) case ContextMenuItemTagGoBack: - shouldEnable = frame->loader()->canGoBackOrForward(-1); + shouldEnable = frame->page() && frame->page()->canGoBackOrForward(-1); break; case ContextMenuItemTagGoForward: - shouldEnable = frame->loader()->canGoBackOrForward(1); + shouldEnable = frame->page() && frame->page()->canGoBackOrForward(1); break; case ContextMenuItemTagStop: shouldEnable = frame->loader()->documentLoader()->isLoadingInAPISense(); |