Skip to content

Commit

Permalink
Fixed CORE-4440: isql crash without connect when execute command "sho…
Browse files Browse the repository at this point in the history
…w version"
  • Loading branch information
AlexPeshkoff committed Jun 17, 2014
1 parent 685b5f1 commit 86e729e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/yvalve/utl.cpp
Expand Up @@ -367,6 +367,9 @@ void FB_CARG UtlInterface::dumpBlob(IStatus* status, ISC_QUAD* blobId,
if (!file)
system_error::raise("fopen");

if (!att)
Arg::Gds(isc_bad_db_handle).raise();

dump(status, blobId, att, tra, file);
}
catch (const Exception& ex)
Expand Down Expand Up @@ -397,6 +400,9 @@ void FB_CARG UtlInterface::loadBlob(IStatus* status, ISC_QUAD* blobId,
if (!file)
system_error::raise("fopen");

if (!att)
Arg::Gds(isc_bad_db_handle).raise();

load(status, blobId, att, tra, file);
}
catch (const Exception& ex)
Expand All @@ -423,6 +429,9 @@ void UtlInterface::getFbVersion(IStatus* status, IAttachment* att,
**************************************/
try
{
if (!att)
Arg::Gds(isc_bad_db_handle).raise();

UCharBuffer buffer;
USHORT buf_len = 256;
UCHAR* buf = buffer.getBuffer(buf_len);
Expand Down

0 comments on commit 86e729e

Please sign in to comment.