mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-04-17 02:44:45 +08:00
Prevent null pointer access
This commit is contained in:
parent
e4a71982d9
commit
6d8e396e92
@ -390,7 +390,13 @@ void CDockAreaTitleBar::onTabsMenuActionTriggered(QAction* Action)
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void CDockAreaTitleBar::updateDockWidgetActionsButtons()
|
void CDockAreaTitleBar::updateDockWidgetActionsButtons()
|
||||||
{
|
{
|
||||||
CDockWidget* DockWidget = d->TabBar->currentTab()->dockWidget();
|
auto Tab = d->TabBar->currentTab();
|
||||||
|
if (!Tab)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
CDockWidget* DockWidget = Tab->dockWidget();
|
||||||
if (!d->DockWidgetActionsButtons.isEmpty())
|
if (!d->DockWidgetActionsButtons.isEmpty())
|
||||||
{
|
{
|
||||||
for (auto Button : d->DockWidgetActionsButtons)
|
for (auto Button : d->DockWidgetActionsButtons)
|
||||||
|
Loading…
Reference in New Issue
Block a user