]> git.saurik.com Git - wxWidgets.git/commit - src/generic/colrdlgg.cpp
Fix bug with using uninitialized flags in GetParentForModalDialog().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 18 Apr 2010 00:05:37 +0000 (00:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 18 Apr 2010 00:05:37 +0000 (00:05 +0000)
commitcdc48273b49b0b90d9587a1ecc5935d38a160620
tree76a9d37c5ab5cf5d9330ef909cd2ea9513b2a808
parent852febd80ec724502cf2c6bea5ad898eb78c4dda
Fix bug with using uninitialized flags in GetParentForModalDialog().

GetParentForModalDialog() was called from the ctor initialized list before
m_windowStyle could be initialized by the base class ctor in several different
places, meaning that the check for wxDIALOG_NO_PARENT in this function was
using uninitialized variable.

Fix this by passing the style parameter explicitly to this function to allow
using it from derived class ctors. Still keep an overload which uses the
actual window parent and flags which is simpler to use for later calls to this
function.

Thanks valgrind for finding this one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
24 files changed:
include/wx/dialog.h
src/common/dlgcmn.cpp
src/generic/colrdlgg.cpp
src/generic/dirdlgg.cpp
src/generic/fdrepdlg.cpp
src/generic/filedlgg.cpp
src/generic/fontdlgg.cpp
src/generic/msgdlgg.cpp
src/generic/numdlgg.cpp
src/generic/prntdlgg.cpp
src/generic/progdlgg.cpp
src/generic/propdlg.cpp
src/generic/textdlgg.cpp
src/generic/tipdlg.cpp
src/gtk/colordlg.cpp
src/gtk/dialog.cpp
src/gtk/dirdlg.cpp
src/gtk/filedlg.cpp
src/gtk/fontdlg.cpp
src/gtk/msgdlg.cpp
src/gtk1/dialog.cpp
src/msw/msgdlg.cpp
src/msw/toplevel.cpp
src/univ/dialog.cpp