Fix the use-after-free bug for previous_widget

This commit is contained in:
Markus Gans 2016-06-27 23:08:32 +02:00
parent a179e190f9
commit 0c4b3a3a14
4 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,6 @@
2016-06-27 Markus Gans <guru.mail@muenster.de>
* Fix the use after free bug for previous_widget
2016-06-26 Markus Gans <guru.mail@muenster.de> 2016-06-26 Markus Gans <guru.mail@muenster.de>
* Bug fix for FWindow::activatePrevWindow() * Bug fix for FWindow::activatePrevWindow()

View File

@ -25,4 +25,6 @@ Missing Features
- A possibility to change the window size dynamically with the mouse - A possibility to change the window size dynamically with the mouse
- Add a window switcher on the right side of the status bar - Add a window switcher on the right side of the status bar
- Add a scrolling area with on-demand scroll bars for FButtonGroup - Add a scrolling area with on-demand scroll bars for FButtonGroup
- Adding for flexible layouts a FGrid widget container that organizes
its child widgets in rows and columns

View File

@ -22,7 +22,10 @@ FWindow::FWindow(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FWindow::~FWindow() // destructor FWindow::~FWindow() // destructor
{ } {
if ( previous_widget == this )
previous_widget = 0;
}
// protected methods of FWindow // protected methods of FWindow

View File

@ -740,7 +740,7 @@ void MyDialog::cb_view (FWidget*, void* data_ptr)
return; return;
FDialog* view = new FDialog(this); FDialog* view = new FDialog(this);
view->setText ("viewer"); view->setText ("Viewer");
view->setGeometry (1+int((getRootWidget()->getWidth()-60)/2), view->setGeometry (1+int((getRootWidget()->getWidth()-60)/2),
int(getRootWidget()->getHeight()/6), int(getRootWidget()->getHeight()/6),
60, 60,