mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Merge changes I732bc5ca,If7948cdd
* changes: [liba] Abort if malloc does not return a defined pointer [apps/shared] In list controller, if the number of rows has decreased, reinit the scrolling before selecting the last row
This commit is contained in:
@@ -153,6 +153,7 @@ void ListController::didBecomeFirstResponder() {
|
||||
m_selectableTableView.selectCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
|
||||
}
|
||||
if (m_selectableTableView.selectedRow() >= numberOfRows()) {
|
||||
m_selectableTableView.selectCellAtLocation(1, 0);
|
||||
m_selectableTableView.selectCellAtLocation(m_selectableTableView.selectedColumn(), numberOfRows()-1);
|
||||
}
|
||||
footer()->setSelectedButton(-1);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <private/memconfig.h>
|
||||
|
||||
#if LIBA_LOG_DYNAMIC_MEMORY
|
||||
@@ -55,6 +56,11 @@ void * malloc(size_t size) {
|
||||
ion_log_print_integer((uint32_t)size);
|
||||
ion_log_print_string("\n");
|
||||
#endif
|
||||
/* If the process could not find enough space in the memory dedicated to
|
||||
* dynamic allocation, p is NULL. The conventional malloc just return NULL
|
||||
* without crashing. However, for debuging purposes, we abort the process
|
||||
* in that case to easily spot memory leaking. */
|
||||
assert(p != NULL);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user