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:
@@ -236,7 +236,7 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
|
|||||||
bool fullScreen,
|
bool fullScreen,
|
||||||
wxRect* rect)
|
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
|
// The image should be offset by this amount
|
||||||
m_offset = hotspot;
|
m_offset = hotspot;
|
||||||
@@ -249,8 +249,6 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
|
|||||||
m_isDirty = false;
|
m_isDirty = false;
|
||||||
m_isDirty = false;
|
m_isDirty = false;
|
||||||
|
|
||||||
if (window)
|
|
||||||
{
|
|
||||||
window->CaptureMouse();
|
window->CaptureMouse();
|
||||||
|
|
||||||
if (m_cursor.Ok())
|
if (m_cursor.Ok())
|
||||||
@@ -258,7 +256,6 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
|
|||||||
m_oldCursor = window->GetCursor();
|
m_oldCursor = window->GetCursor();
|
||||||
window->SetCursor(m_cursor);
|
window->SetCursor(m_cursor);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Make a copy of the window so we can repair damage done as the image is
|
// Make a copy of the window so we can repair damage done as the image is
|
||||||
// dragged.
|
// dragged.
|
||||||
|
@@ -349,9 +349,9 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
|
|||||||
|
|
||||||
wxMDIClientWindow* clientWindow = parent->GetClientWindow();
|
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);
|
SetMDIParentFrame(parent);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user