avoids using a BAlert when no be_app is available
it avoids crashing but console apps using a BApplication still show an alert we might want to keep only a stderr warning git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13979 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -924,7 +924,10 @@ Compress(BPositionIO *in, BPositionIO *out)
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
(new BAlert("Wrong type", "Color space not implemented.", "Quit"))->Go();
|
if (be_app)
|
||||||
|
(new BAlert("Wrong type", "Color space not implemented.", "Quit"))->Go();
|
||||||
|
else
|
||||||
|
fprintf(stderr, "Wrong type: Color space not implemented.\n");
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1056,7 +1059,10 @@ Decompress(BPositionIO *in, BPositionIO *out)
|
|||||||
switch (cinfo.out_color_space)
|
switch (cinfo.out_color_space)
|
||||||
{
|
{
|
||||||
case JCS_UNKNOWN: /* error/unspecified */
|
case JCS_UNKNOWN: /* error/unspecified */
|
||||||
(new BAlert("From Type", "Jpeg uses unknown color type", "Quit"))->Go();
|
if (be_app)
|
||||||
|
(new BAlert("From Type", "Jpeg uses unknown color type", "Quit"))->Go();
|
||||||
|
else
|
||||||
|
fprintf(stderr, "From Type: Jpeg uses unknown color type\n");
|
||||||
break;
|
break;
|
||||||
case JCS_GRAYSCALE: /* monochrome */
|
case JCS_GRAYSCALE: /* monochrome */
|
||||||
// Check if user wants to read only as RGB32 or not
|
// Check if user wants to read only as RGB32 or not
|
||||||
@@ -1088,7 +1094,10 @@ Decompress(BPositionIO *in, BPositionIO *out)
|
|||||||
converter = convert_from_CMYK_to_32;
|
converter = convert_from_CMYK_to_32;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
(new BAlert("From Type", "Jpeg uses hmm... i don't know really :(", "Quit"))->Go();
|
if (be_app)
|
||||||
|
(new BAlert("From Type", "Jpeg uses hmm... i don't know really :(", "Quit"))->Go();
|
||||||
|
else
|
||||||
|
fprintf(stderr, "From Type: Jpeg uses hmm... i don't know really :(\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user