use wxCHECK instead of wxASSERT to avoid use of NULL pointer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
cd5dea50f8
commit
cbaa866f0a
@ -236,7 +236,7 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
|
||||
bool fullScreen,
|
||||
wxRect* rect)
|
||||
{
|
||||
wxASSERT_MSG( (window != 0), wxT("Window must not be null in BeginDrag."));
|
||||
wxCHECK_MSG( window, false, wxT("Window must not be null in BeginDrag."));
|
||||
|
||||
// The image should be offset by this amount
|
||||
m_offset = hotspot;
|
||||
@ -249,15 +249,12 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
|
||||
m_isDirty = false;
|
||||
m_isDirty = false;
|
||||
|
||||
if (window)
|
||||
{
|
||||
window->CaptureMouse();
|
||||
window->CaptureMouse();
|
||||
|
||||
if (m_cursor.Ok())
|
||||
{
|
||||
m_oldCursor = window->GetCursor();
|
||||
window->SetCursor(m_cursor);
|
||||
}
|
||||
if (m_cursor.Ok())
|
||||
{
|
||||
m_oldCursor = window->GetCursor();
|
||||
window->SetCursor(m_cursor);
|
||||
}
|
||||
|
||||
// Make a copy of the window so we can repair damage done as the image is
|
||||
|
@ -349,9 +349,9 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
|
||||
|
||||
wxMDIClientWindow* clientWindow = parent->GetClientWindow();
|
||||
|
||||
wxASSERT_MSG( (clientWindow != (wxWindow*) NULL), "Missing MDI client window.");
|
||||
wxCHECK_MSG( clientWindow, false, "Missing MDI client window." );
|
||||
|
||||
if (clientWindow) clientWindow->AddChild(this);
|
||||
clientWindow->AddChild(this);
|
||||
|
||||
SetMDIParentFrame(parent);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user