From 81007a2debffebc97c230cd810fb1bf10760180f Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 19 Sep 2021 13:28:58 +0300 Subject: Refactoring Window to split off MainWindow MainWindow represents (one of) the main windows of the app, while the basic Window will be a used for popups. Only MainWindow supports split view modes. --- src/ui/paint.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ui/paint.c') diff --git a/src/ui/paint.c b/src/ui/paint.c index a3ee32c6..5506f845 100644 --- a/src/ui/paint.c +++ b/src/ui/paint.c @@ -152,6 +152,9 @@ void drawSoftShadow_Paint(const iPaint *d, iRect inner, int thickness, int color addv_I2(&inner.pos, origin_Paint); SDL_Renderer *render = renderer_Paint_(d); SDL_Texture *shadow = get_Window()->borderShadow; + if (!shadow) { + return; + } const iInt2 size = size_SDLTexture(shadow); const iRect outer = expanded_Rect(inner, init1_I2(thickness)); const iColor clr = get_Color(color); -- cgit v1.2.3