fix SEGFAULT when nullptr
Some checks failed
/ sync-to-origin (push) Has been cancelled

This commit is contained in:
PoliEcho 2025-04-01 09:32:38 +02:00
parent 22333b6593
commit 52bea2e3c5
2 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#include <string_view>
#ifndef VERSION
#define VERSION "0.7.1"
#define VERSION "0.7.2"
#define NAME "bakatui"
inline constexpr auto hash_djb2a(const std::string_view sv) {

View File

@ -5,6 +5,9 @@
#include <panel.h>
void delete_all(std::vector<allocation> *allocated) {
if (allocated == nullptr) {
return;
}
for (long long i = allocated->size() - 1; i >= 0; i--) {
switch (allocated->at(i).type) {
case WINDOW_ARRAY: {