mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
Merge pull request #126 from Nooby4Ever/fix-issue-12
Added sanity check to avoid making 0x0 window (resulting in Segementation Fault)
This commit is contained in:
commit
3dbec780bc
@ -643,6 +643,11 @@ static void init_window(lua::state &l __attribute__((unused)), bool own)
|
|||||||
|
|
||||||
int b = border_inner_margin.get(l) + border_width.get(l)
|
int b = border_inner_margin.get(l) + border_width.get(l)
|
||||||
+ border_outer_margin.get(l);
|
+ border_outer_margin.get(l);
|
||||||
|
|
||||||
|
/* Sanity check to avoid making an invalid 0x0 window */
|
||||||
|
if (b == 0) {
|
||||||
|
b = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (own_window_type.get(l) == TYPE_OVERRIDE) {
|
if (own_window_type.get(l) == TYPE_OVERRIDE) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user