* Bug fix: The configuration dialog was never opened, because it could

read the attribute "transport_address" created and set to an empty
  string by the print_server when the printer was created. 
  fEndpoint used an empty host name to connect to and then failed.
  Not sure why this caused a crash after closing the error dialog.
  Maybe something went wrong in the destructor using an invalid fEndpoint?
  Cures the symptoms of ticket #6973.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39818 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2010-12-12 08:06:19 +00:00
parent 2e3906da98
commit b12b2a60a7
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg)
{
BString address;
if (printer->ReadAttrString("transport_address", &address) < 0) {
if (printer->ReadAttrString("transport_address", &address) < 0
|| address.Length() == 0) {
SetupWindow *setup = new SetupWindow(printer);
if (setup->Go() == B_ERROR)
return;