Skip to content
Snippets Groups Projects
Commit 6fdb573a authored by Alexander Tuxen's avatar Alexander Tuxen Committed by Felix Gerking
Browse files

fixed Segfault in compositor-message

parent 88bf767f
No related branches found
No related tags found
1 merge request!48Rework Compositor
......@@ -24,17 +24,22 @@ int main(int argc, char *argv[])
}
QString command;
bool ok;
bool ok = false;
qint32 windowid = -1;
qint32 screenid = -1;
command = QString(args[0]);
windowid = qint32(args[1].toInt(&ok));
if(ok){
if(args.length() > 2){
screenid = qint32(args[2].toInt(&ok));
if(args.length() > 1){
windowid = qint32(args[1].toInt(&ok));
if(ok){
if(args.length() > 2){
screenid = qint32(args[2].toInt(&ok));
}
}
}
else
ok = true;
if(! ok){
QTextStream(stdout) << "windowid or screenid could not be parsed as integer.";
parser.showHelp();
......
......@@ -405,7 +405,7 @@ WaylandCompositor {
var affectedSurfaces = getActiveSurfaces(getPidFromIviId(windowid));
if (affectedSurfaces.length === 0)
{
console.log("no screens found for ID", windowid);
console.log("no screens found for IVI ID", windowid);
server.returnStatus(-1);
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment