Skip to content

Commit

Permalink
Small fix on ui.window.create() function on standard library.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Oct 28, 2024
1 parent 6184e24 commit e1e823d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/zhvlib/UI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ ZHIVO_FUNC(ui_window_create) {
throw std::runtime_error("Parameter height must be a number");

std::string key = generateUUID();
if(windowDictionary.find(key) != windowDictionary.end())
while(windowDictionary.find(key) != windowDictionary.end())
key = generateUUID();

windowDictionary[key] = uiNewWindow(
title.toString().c_str(),
width.getNumber(),
Expand Down

0 comments on commit e1e823d

Please sign in to comment.