Skip to content

Commit

Permalink
DisplayCommandHandler:potential crash
Browse files Browse the repository at this point in the history
Reference:xen-troops#116

The assert(..) verification has been added to avoid the crash.

Signed-off-by: Ihor Usyk <[email protected]>
  • Loading branch information
iusyk committed Jun 24, 2020
1 parent 4977433 commit 4e08dd5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/displayBackend/DisplayCommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "DisplayCommandHandler.hpp"

#include <iomanip>

#include <cassert>
#include <xen/be/Exception.hpp>

using std::dec;
Expand Down Expand Up @@ -89,15 +89,20 @@ DisplayCommandHandler::DisplayCommandHandler(
mEventId(0),
mLog("CommandHandler")
{
assert(mConnector);
assert(mDisplay);
assert(mBuffersStorage);
assert(mEventBuffer);

LOG(mLog, DEBUG) << "Create command handler, connector name: "
<< mConnector->getName();
<< mConnector->getName();
}

DisplayCommandHandler::~DisplayCommandHandler()
{

LOG(mLog, DEBUG) << "Delete command handler, connector name: "
<< mConnector->getName();

mConnector.reset();
}

Expand Down

0 comments on commit 4e08dd5

Please sign in to comment.