print something to stderr when window creation fails
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16718 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2598,18 +2598,23 @@ ServerApp::_CreateWindow(int32 code, BPrivate::LinkReceiver& link,
|
|||||||
if (window != NULL) {
|
if (window != NULL) {
|
||||||
status = window->Init(frame, (window_look)look, (window_feel)feel,
|
status = window->Init(frame, (window_look)look, (window_feel)feel,
|
||||||
flags, workspaces);
|
flags, workspaces);
|
||||||
if (status == B_OK && !window->Run())
|
if (status == B_OK && !window->Run()) {
|
||||||
|
fprintf(stderr, "ServerApp::_CreateWindow() - failed to run the window thread\n");
|
||||||
status = B_ERROR;
|
status = B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
// add the window to the list
|
// add the window to the list
|
||||||
if (status == B_OK && fWindowListLock.Lock()) {
|
if (status == B_OK && fWindowListLock.Lock()) {
|
||||||
status = fWindowList.AddItem(window) ? B_OK : B_NO_MEMORY;
|
status = fWindowList.AddItem(window) ? B_OK : B_NO_MEMORY;
|
||||||
|
if (status < B_OK)
|
||||||
|
fprintf(stderr, "ServerApp::_CreateWindow() - no memory to add window to list\n");
|
||||||
fWindowListLock.Unlock();
|
fWindowListLock.Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status < B_OK)
|
if (status < B_OK) {
|
||||||
delete window;
|
delete window;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user