Commit 96005daa authored by Jan Möbius's avatar Jan Möbius
Browse files

Security check when adding toolbar

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11615 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b26a55f8
......@@ -83,6 +83,13 @@ void CoreWidget::slotAddToolbar(QToolBar* _toolbar) {
}
// Security check if all fails (no scripting plugin, no sender)
if ( id == -1) {
emit log(LOGERR,tr("slotAddToolbar: no sender and scripting plugin not available! Strange!"));
emit log(LOGERR,tr("slotAddToolbar: Could not add Toolbar!"));
return;
}
// Check if a toolbar with the same name is already registered
for ( unsigned int i = 0 ; i < toolbars_.size(); ++i ) {
if ( toolbars_[i]->windowTitle() == _toolbar->windowTitle() ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment