Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctor DisplayBackend - pointer is not checked for a nullptr #105

Open
iusyk opened this issue May 18, 2020 · 1 comment
Open

ctor DisplayBackend - pointer is not checked for a nullptr #105

iusyk opened this issue May 18, 2020 · 1 comment

Comments

@iusyk
Copy link
Collaborator

iusyk commented May 18, 2020

DisplayBackend::DisplayBackend(DisplayPtr display,
const string& deviceName) :
BackendBase("DisplBackend", deviceName),
mDisplay(display)
{
// mDisplay maybe not initilized
// reasonable to add
if(mDisplay) {
mDisplay->start();
}
else {
// inform about the error (throw an exception) or change the object state at invalid
}
}

@iusyk iusyk changed the title ctor DisplayBackend - pointer is not checke for a nullptr ctor DisplayBackend - pointer is not checked for a nullptr May 19, 2020
iusyk added a commit to iusyk/displ_be that referenced this issue Jun 17, 2020
Reference:xen-troops#105
The ctor parameter mDisplay is checked for nullptr
If value is nullptr, throws the exception std::invalid_argument

Signed-off-by: Ihor Usyk <[email protected]>
@iusyk
Copy link
Collaborator Author

iusyk commented Jun 18, 2020

fix #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant