renderer: null check before hashing

Fixes segfault.
This commit is contained in:
itsmattkc
2020-06-16 15:16:52 +10:00
parent 89b3fa33f8
commit 66b63535a3
+3 -1
View File
@@ -349,7 +349,9 @@ QByteArray RenderBackend::HashNode(const Node *n, const VideoParams &params, con
hasher.addData(reinterpret_cast<const char*>(&params.effective_height()), sizeof(int));
hasher.addData(reinterpret_cast<const char*>(&params.format()), sizeof(PixelFormat::Format));
n->Hash(hasher, time);
if (n) {
n->Hash(hasher, time);
}
return hasher.result();
}