Skip to content

Commit 6c67cc4

Browse files
committed
Untwisting logic
1 parent 9f247ce commit 6c67cc4

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/background_client.cpp

+3-11
Original file line numberDiff line numberDiff line change
@@ -398,18 +398,10 @@ void BackgroundClient::Self::draw_screen(SurfaceInfo& info, bool draws_crash) co
398398
file_exists = false;
399399
}
400400

401+
bool should_draw_crash = draws_crash && file_exists;
401402
if (!wallpaper_enabled)
402403
{
403-
if (draws_crash)
404-
{
405-
if (!file_exists)
406-
{
407-
// If we're drawing a crash but the diagnostic file doesn't
408-
// exist, continue to not show the background.
409-
return;
410-
}
411-
}
412-
else
404+
if (!should_draw_crash)
413405
{
414406
return;
415407
}
@@ -456,7 +448,7 @@ void BackgroundClient::Self::draw_screen(SurfaceInfo& info, bool draws_crash) co
456448

457449
auto buffer = static_cast<unsigned char*>(info.content_area);
458450

459-
if (draws_crash && file_exists)
451+
if (should_draw_crash)
460452
{
461453
render_background(width, height, buffer, crash_background_colour);
462454
render_text(width, height, buffer);

0 commit comments

Comments
 (0)