Add a more specific error for a nonexistent screenshot

This commit is contained in:
Lauri Kasanen 2021-03-04 13:43:05 +02:00
parent 688e749fda
commit 1269fddadf

View File

@ -108,6 +108,9 @@ uint8_t *GetAPIMessager::netGetScreenshot(uint16_t w, uint16_t h,
if (h > screenH)
h = screenH;
if (!screenW || !screenH)
vlog.error("Screenshot requested but no screenshot exists (screen hasn't been viewed)");
if (!w || !h || q > 9 || !staging)
return NULL;